void OMXPlayerAudio::WaitForBuffers() { // make sure there are no more packets available m_messageQueue.WaitUntilEmpty(); // make sure almost all has been rendered // leave 500ms to avound buffer underruns double delay = GetCacheTime(); if(delay > 0.5) Sleep((int)(1000 * (delay - 0.5))); }
double CDVDAudio::GetPlayingPts() { if (m_playingPts == DVD_NOPTS_VALUE) return 0.0; double now = CDVDClock::GetAbsoluteClock(); double diff = now - m_timeOfPts; double cache = GetCacheTime(); double played = 0.0; if (diff < cache) played = diff; else played = cache; m_timeOfPts = now; m_playingPts += played; return m_playingPts; }
std::string OMXPlayerAudio::GetPlayerInfo() { std::ostringstream s; s << "aq:" << std::setw(2) << std::min(99,m_messageQueue.GetLevel() + MathUtils::round_int(100.0/8.0*GetCacheTime())) << "%"; s << ", Kb/s:" << std::fixed << std::setprecision(2) << (double)GetAudioBitrate() / 1024.0; return s.str(); }
void CAESinkIntelSMD::GetDelay(AEDelayStatus& status) { status.SetDelay(GetCacheTime()); }