Skip to content

Commit

Permalink
[AE] Fix large buffertime check
Browse files Browse the repository at this point in the history
  • Loading branch information
popcornmix committed Oct 10, 2015
1 parent d93f05a commit 8617d96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
Expand Up @@ -1063,10 +1063,10 @@ void CActiveAE::Configure(AEAudioFormat *desiredFmt)
m_sink.m_controlPort.SendOutMessage(CSinkControlProtocol::VOLUME, &m_volume, sizeof(float));

// limit buffer size in case of sink returns large buffer
unsigned int buffertime = m_sinkFormat.m_frames / m_sinkFormat.m_sampleRate;
double buffertime = (double)m_sinkFormat.m_frames / m_sinkFormat.m_sampleRate;
if (buffertime > MAX_BUFFER_TIME)
{
CLog::Log(LOGWARNING, "ActiveAE::%s - sink returned large buffer of %d ms, reducing to %d ms", __FUNCTION__, buffertime, (int)(MAX_BUFFER_TIME*1000));
CLog::Log(LOGWARNING, "ActiveAE::%s - sink returned large buffer of %d ms, reducing to %d ms", __FUNCTION__, (int)(buffertime * 1000), (int)(MAX_BUFFER_TIME*1000));
m_sinkFormat.m_frames = MAX_BUFFER_TIME * m_sinkFormat.m_sampleRate;
}
}
Expand Down

0 comments on commit 8617d96

Please sign in to comment.