mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-26 07:39:45 -06:00
Swapped FFDShow's DPL2 decoder by FreeSurround
Added class in AudioCommon for the surround decoder
This commit is contained in:
36
Source/Core/AudioCommon/SurroundDecoder.h
Normal file
36
Source/Core/AudioCommon/SurroundDecoder.h
Normal file
@ -0,0 +1,36 @@
|
||||
// Copyright 2017 Dolphin Emulator Project
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <memory>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/FixedSizeQueue.h"
|
||||
|
||||
class DPL2FSDecoder;
|
||||
|
||||
namespace AudioCommon
|
||||
{
|
||||
class SurroundDecoder
|
||||
{
|
||||
public:
|
||||
explicit SurroundDecoder(u32 sample_rate, u32 frame_block_size);
|
||||
~SurroundDecoder();
|
||||
size_t QueryFramesNeededForSurroundOutput(const size_t output_frames) const;
|
||||
void PutFrames(const short* in, const size_t num_frames_in);
|
||||
void ReceiveFrames(float* out, const size_t num_frames_out);
|
||||
void Clear();
|
||||
|
||||
private:
|
||||
u32 m_sample_rate;
|
||||
u32 m_frame_block_size;
|
||||
|
||||
std::unique_ptr<DPL2FSDecoder> m_fsdecoder;
|
||||
std::array<float, 32768> m_float_conversion_buffer;
|
||||
FixedSizeQueue<float, 32768> m_decoded_fifo;
|
||||
};
|
||||
|
||||
} // AudioCommon
|
Reference in New Issue
Block a user