aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRainer Hochecker <fernetmenta@online.de>2013-09-25 06:25:03 -0700
committerRainer Hochecker <fernetmenta@online.de>2013-09-25 06:25:03 -0700
commit92b87d56695ebb1865ab8a57c4de9faf462d91e7 (patch)
tree3b0733f6cdcf09097cd7faec78842e9dbf9bf4da
parent7f452883195f672f5237afbce8de09bd642ea72a (diff)
parent83fe61d7b2a841c55e1c743593ae244ba93de7c3 (diff)
Merge pull request #3327 from FernetMenta/aefixes
ActiveAE: force resampler if dvdplayer requests it
-rw-r--r--xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp4
-rw-r--r--xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEBuffer.cpp4
-rw-r--r--xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp1
-rw-r--r--xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.h1
4 files changed, 9 insertions, 1 deletions
diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
index 753829ade8..7a6732a5a4 100644
--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
@@ -981,6 +981,7 @@ void CActiveAE::Configure(AEAudioFormat *desiredFmt)
if (!(*it)->m_resampleBuffers)
{
(*it)->m_resampleBuffers = new CActiveAEBufferPoolResample((*it)->m_inputBuffers->m_format, outputFormat, m_settings.resampleQuality);
+ (*it)->m_resampleBuffers->m_changeResampler = (*it)->m_forceResampler;
(*it)->m_resampleBuffers->Create(MAX_CACHE_LEVEL*1000, false, m_settings.stereoupmix);
}
if (m_mode == MODE_TRANSCODE || m_streams.size() > 1)
@@ -1073,6 +1074,9 @@ CActiveAEStream* CActiveAE::CreateStream(MsgStreamNew *streamMsg)
if (streamMsg->options & AESTREAM_PAUSED)
stream->m_paused = true;
+ if (streamMsg->options & AESTREAM_FORCE_RESAMPLE)
+ stream->m_forceResampler = true;
+
m_streams.push_back(stream);
return stream;
diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEBuffer.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEBuffer.cpp
index 4d8f36d43f..e64b2485fa 100644
--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEBuffer.cpp
+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEBuffer.cpp
@@ -159,7 +159,8 @@ bool CActiveAEBufferPoolResample::Create(unsigned int totaltime, bool remap, boo
if (m_inputFormat.m_channelLayout != m_format.m_channelLayout ||
m_inputFormat.m_sampleRate != m_format.m_sampleRate ||
- m_inputFormat.m_dataFormat != m_format.m_dataFormat)
+ m_inputFormat.m_dataFormat != m_format.m_dataFormat ||
+ m_changeResampler)
{
m_resampler = new CActiveAEResample();
m_resampler->Init(CActiveAEResample::GetAVChannelLayout(m_format.m_channelLayout),
@@ -178,6 +179,7 @@ bool CActiveAEBufferPoolResample::Create(unsigned int totaltime, bool remap, boo
}
m_stereoUpmix = upmix;
+ m_changeResampler = false;
return true;
}
diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp
index 897f4637a5..d5b01ea0d6 100644
--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp
+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp
@@ -55,6 +55,7 @@ CActiveAEStream::CActiveAEStream(AEAudioFormat *format)
m_convertFn = NULL;
m_leftoverBuffer = new uint8_t[m_format.m_frameSize];
m_leftoverBytes = 0;
+ m_forceResampler = false;
}
CActiveAEStream::~CActiveAEStream()
diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.h b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.h
index 75aa47c7f8..607e4caa16 100644
--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.h
+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.h
@@ -115,6 +115,7 @@ protected:
float m_fadingBase;
float m_fadingTarget;
int m_fadingTime;
+ bool m_forceResampler;
};
}