From be9e90b7070e1895c39e715760c141ef4a777e1e Mon Sep 17 00:00:00 2001 From: Yuusei KUWANA Date: Wed, 29 Oct 2014 21:58:53 +0900 Subject: [PATCH] revert buffer allocation --- OMXAudio.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/OMXAudio.cpp b/OMXAudio.cpp index bddf8fbf..b93cee75 100644 --- a/OMXAudio.cpp +++ b/OMXAudio.cpp @@ -492,8 +492,7 @@ bool COMXAudio::Initialize(OMXClock *clock, const OMXAudioConfig &config, uint64 // should be big enough that common formats (e.g. 6 channel DTS) fit in a single packet. // we don't mind less common formats being split (e.g. ape/wma output large frames) // 6 channel 32bpp float to 8 channel 16bpp in, so a full 48K input buffer will fit the output buffer -// m_ChunkLen = AUDIO_DECODE_OUTPUT_BUFFER * (m_InputChannels * m_BitsPerSample) >> (rounded_up_channels_shift[m_InputChannels] + 4); - m_ChunkLen = AUDIO_DECODE_OUTPUT_BUFFER * (6 * m_BitsPerSample) >> (rounded_up_channels_shift[6] + 4); + m_ChunkLen = AUDIO_DECODE_OUTPUT_BUFFER * (m_InputChannels * m_BitsPerSample) >> (rounded_up_channels_shift[m_InputChannels] + 4); m_wave_header.Samples.wSamplesPerBlock = 0; m_wave_header.Format.nChannels = m_InputChannels; @@ -691,8 +690,6 @@ bool COMXAudio::ChangeInputFormat(const CStdString& device, int iChannels, uint6 CSingleLock lock (m_critSection); OMX_ERRORTYPE omx_err; - layout = PCM_LAYOUT_2_0; - m_InputChannels = iChannels; if(m_InputChannels == 0)