diff options
author | Peter Frühberger <Peter.Fruehberger@gmail.com> | 2014-09-26 22:30:31 +0200 |
---|---|---|
committer | Peter Frühberger <Peter.Fruehberger@gmail.com> | 2014-09-26 22:30:31 +0200 |
commit | b9764bc43ae2fe78b8e52952bf5903186f242990 (patch) | |
tree | 7ffa60685aadaae9e51236f858a45bb32e769831 | |
parent | ab7c55fc47cd2a20837b717979ecbd37fe50eacb (diff) | |
parent | 79e0ba643e788df34d5ce26207b1f8cb1e5e9e11 (diff) |
Merge pull request #5417 from FernetMenta/aefixes
AE: optimization and fixes
-rw-r--r-- | xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp | 3 | ||||
-rw-r--r-- | xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp index de07de5692..2d013c83f0 100644 --- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp +++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp @@ -91,7 +91,8 @@ void CEngineStats::GetDelay(AEDelayStatus& status) void CEngineStats::GetDelay(AEDelayStatus& status, CActiveAEStream *stream) { CSingleLock lock(m_lock); - GetDelay(status); + status = m_sinkDelay; + status.delay += (double)m_bufferedSamples / m_sinkSampleRate; status.delay += m_sinkLatency; status.delay += stream->m_bufferedTime / stream->m_streamResampleRatio; diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp index 16e5513c0e..7acc0d0b69 100644 --- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp +++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp @@ -431,8 +431,9 @@ double CActiveAEStream::GetResampleRatio() bool CActiveAEStream::SetResampleRatio(double ratio) { + if (ratio != m_streamResampleRatio) + AE.SetStreamResampleRatio(this, ratio); m_streamResampleRatio = ratio; - AE.SetStreamResampleRatio(this, m_streamResampleRatio); return true; } |