aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmarshallnz <jcmarsha@gmail.com>2014-05-01 18:59:18 +1200
committerJonathan Marshall <jmarshall@xbmc.org>2014-05-02 08:03:54 +1200
commitf57cd9abca1d8ae1938194344661201f496731ff (patch)
tree8c3d57311a38637d9f4146565bb3388b3b002697
parent8919befdb4eebafaacd79d315135289361cfa650 (diff)
Merge pull request #4619 from fritsch/aefixes
ActiveAE: correct time of buffered samples by resample ratio
-rw-r--r--xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp2
-rw-r--r--xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp1
2 files changed, 2 insertions, 1 deletions
diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
index ca156c8094..8013d71fe3 100644
--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
@@ -102,7 +102,7 @@ float CEngineStats::GetDelay(CActiveAEStream *stream)
if (delay < 0)
delay = 0.0;
- delay += stream->m_bufferedTime;
+ delay += stream->m_bufferedTime / stream->m_streamResampleRatio;
return delay;
}
diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp
index 99989b385c..0287e7384e 100644
--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp
+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp
@@ -58,6 +58,7 @@ CActiveAEStream::CActiveAEStream(AEAudioFormat *format)
m_forceResampler = false;
m_remapper = NULL;
m_remapBuffer = NULL;
+ m_streamResampleRatio = 1.0;
}
CActiveAEStream::~CActiveAEStream()