Debian Codegraph @

Source/Core/AudioCommon/SurroundDecoder.h

raw symbols SCIP
1 // Copyright 2017 Dolphin Emulator Project
2 // SPDX-License-Identifier: GPL-2.0-or-later
3
4 #pragma once
5
6 #include <array>
7 #include <memory>
8
9 #include "Common/CommonTypes.h"
10 #include "Common/FixedSizeQueue.h"
11
12 class DPL2FSDecoder;
13
14 namespace AudioCommon
15 {
16 class SurroundDecoder
17 {
18 public:
19 explicit SurroundDecoder(u32 sample_rate, u32 frame_block_size);
20 ~SurroundDecoder();
21 size_t QueryFramesNeededForSurroundOutput(const size_t output_frames) const;
22 void PutFrames(const short* in, const size_t num_frames_in);
23 void ReceiveFrames(float* out, const size_t num_frames_out);
24 void Clear();
25
26 private:
27 u32 m_sample_rate;
28 u32 m_frame_block_size;
29
30 std::unique_ptr<DPL2FSDecoder> m_fsdecoder;
31 std::array<float, 32768> m_float_conversion_buffer;
32 Common::FixedSizeQueue<float, 32768> m_decoded_fifo;
33 };
34
35 } // namespace AudioCommon