Swapped FFDShow's DPL2 decoder by FreeSurround

Added class in AudioCommon for the surround decoder
This commit is contained in:
LAGonauta
2017-08-09 16:57:26 -03:00
parent 7b9375875c
commit df631f0d75
7 changed files with 157 additions and 14 deletions

View File

@ -8,6 +8,7 @@
#include <atomic>
#include "AudioCommon/AudioStretcher.h"
#include "AudioCommon/SurroundDecoder.h"
#include "AudioCommon/WaveFile.h"
#include "Common/CommonTypes.h"
@ -52,6 +53,9 @@ private:
static constexpr float CONTROL_FACTOR = 0.2f;
static constexpr u32 CONTROL_AVG = 32; // In freq_shift per FIFO size offset
const unsigned int SURROUND_CHANNELS = 6;
const unsigned int SURROUND_BLOCK_SIZE = 512;
class MixerFifo final
{
public:
@ -86,8 +90,8 @@ private:
bool m_is_stretching = false;
AudioCommon::AudioStretcher m_stretcher;
AudioCommon::SurroundDecoder m_surround_decoder;
std::array<short, MAX_SAMPLES * 2> m_scratch_buffer;
std::array<float, MAX_SAMPLES * 2> m_float_conversion_buffer;
WaveFileWriter m_wave_writer_dtk;
WaveFileWriter m_wave_writer_dsp;