diff options
| author | Connor McLaughlin <stenzek@gmail.com> | 2019-02-14 18:38:12 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-14 18:38:12 +1000 |
| commit | 326d72728c0b4b47db4d36ba57ab3ba9984978a6 (patch) | |
| tree | aa435d8e16ebc8464d6489548d9bf1c144221ef3 /Source/Core/AudioCommon/SurroundDecoder.h | |
| parent | 950b952aee0f5a587dbe263e74524ae09170a786 (diff) | |
| parent | c209d07c96373f35d4fa137380a980b2e3a912cd (diff) | |
Merge pull request #5235 from LAGonauta/fs-dplii-decoder
Change FFDShow DPL2 decoder to FreeSurround
Diffstat (limited to 'Source/Core/AudioCommon/SurroundDecoder.h')
| -rw-r--r-- | Source/Core/AudioCommon/SurroundDecoder.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Source/Core/AudioCommon/SurroundDecoder.h b/Source/Core/AudioCommon/SurroundDecoder.h new file mode 100644 index 0000000000..699be74278 --- /dev/null +++ b/Source/Core/AudioCommon/SurroundDecoder.h @@ -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 |
