Skip to content

Commit

Permalink
[DSPProcessFreeSurround] Fix decoder creation and return 0 samples if…
Browse files Browse the repository at this point in the history
… an error occured
  • Loading branch information
AchimTuran committed Jun 24, 2017
1 parent db89c99 commit 7c4418a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/DSPProcessFreeSurround.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ AE_DSP_ERROR CDSPProcess_FreeSurround::StreamInitialize(const AE_DSP_SETTINGS *s

m_DecoderChannelSetup = (channel_setup)(settings->lOutChannelPresentFlags | AE_DSP_PRSNT_CH_LFE);

if (!m_Decoder)
if (m_Decoder)
delete m_Decoder;
m_Decoder = new CFreeSurroundDecoder(m_DecoderChannelSetup, default_block_size, m_SampleRate);

Expand Down Expand Up @@ -169,7 +169,7 @@ float CDSPProcess_FreeSurround::StreamGetDelay()
unsigned int CDSPProcess_FreeSurround::StreamProcess(const float **array_in, float **array_out, unsigned int samples)
{
if (!m_Decoder)
return samples;
return 0;

float **outputs = m_Decoder->getOutputBuffers();

Expand Down

0 comments on commit 7c4418a

Please sign in to comment.