Skip to content
Permalink
Browse files

AE: change definition of AEStream::GetCacheTime

  • Loading branch information...
FernetMenta authored and popcornmix committed Aug 5, 2016
1 parent fb24e79 commit 2d56cfa99ca60adfccf6ef9da426bcc6b0b32ffe
@@ -194,8 +194,8 @@ class CAddonAEStream
virtual bool IsBuffering();

/**
* Returns the time in seconds that it will take
* to underrun the cache if no sample is added.
* Returns the time in seconds of the stream's
* cached audio samples. Engine buffers excluded.
* @return seconds
*/
virtual double GetCacheTime();
@@ -201,9 +201,7 @@ void CEngineStats::GetSyncInfo(CAESyncInfo& info, CActiveAEStream *stream)
float CEngineStats::GetCacheTime(CActiveAEStream *stream)
{
CSingleLock lock(m_lock);
float delay = (float)m_bufferedSamples / m_sinkSampleRate;
if (!m_pcmOutput)
delay = (float)m_bufferedSamples * m_sinkFormat.m_streamInfo.GetDuration() / 1000;
float delay = 0;

for (auto &str : m_streamStats)
{
@@ -111,8 +111,8 @@ class IAEStream
virtual bool IsBuffering() = 0;

/**
* Returns the time in seconds that it will take
* to underrun the cache if no sample is added.
* Returns the time in seconds of the stream's
* cached audio samples. Engine buffers excluded.
* @return seconds
*/
virtual double GetCacheTime() = 0;
@@ -55,7 +55,7 @@ class CDVDAudio : IAEClockCallback
void Destroy();
unsigned int AddPackets(const DVDAudioFrame &audioframe);
double GetPlayingPts();
double GetCacheTime(); // returns total amount of data cached in audio output at this time
double GetCacheTime();
double GetCacheTotal(); // returns total amount the audio device can buffer
double GetDelay(); // returns the time it takes to play a packet if we add one at this time
double GetSyncError();

0 comments on commit 2d56cfa

Please sign in to comment.
You can’t perform that action at this time.