Skip to content

Commit

Permalink
AE: AddPause to sink interface
Browse files Browse the repository at this point in the history
  • Loading branch information
FernetMenta authored and popcornmix committed Jan 21, 2016
1 parent 1ec2343 commit 118ddf1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
9 changes: 8 additions & 1 deletion xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp
Expand Up @@ -902,6 +902,7 @@ unsigned int CActiveAESink::OutputSamples(CSampleBuffer* samples)
unsigned int written = 0;
std::unique_ptr<uint8_t[]> mergebuffer;
uint8_t* p_mergebuffer = NULL;
AEDelayStatus status;

if (m_requestedFormat.m_dataFormat == AE_FMT_RAW)
{
Expand Down Expand Up @@ -981,10 +982,16 @@ unsigned int CActiveAESink::OutputSamples(CSampleBuffer* samples)
totalFrames = size / m_sinkFormat.m_frameSize;
frames = totalFrames;
}
if (samples->pkt->pause_burst_ms > 0)
{
m_sink->AddPause(samples->pkt->pause_burst_ms);
m_sink->GetDelay(status);
m_stats->UpdateSinkDelay(status, samples->pool ? 1 : 0);
return status.delay * 1000;
}
}
}

AEDelayStatus status;
int framesOrPackets;

while(frames > 0)
Expand Down
5 changes: 5 additions & 0 deletions xbmc/cores/AudioEngine/Interfaces/AESink.h
Expand Up @@ -65,6 +65,11 @@ class IAESink
*/
virtual unsigned int AddPackets(uint8_t **data, unsigned int frames, unsigned int offset) = 0;

/*!
* @brief instruct the sink to add a pause
* @param millis ms to pause
*/
virtual void AddPause(unsigned int millis) {};

/*!
* @brief Return a timestamped status structure with delay and sink info
Expand Down

0 comments on commit 118ddf1

Please sign in to comment.