Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[droid] raise waterlevel to reduce frame buffer underruns

  • Loading branch information...
commit 5d28aa39f6146890580796dbfea4bb34a6ab03f1 1 parent add92e5
@davilla davilla authored Cory Fields committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 xbmc/cores/AudioEngine/Engines/SoftAE/SoftAEStream.cpp
View
4 xbmc/cores/AudioEngine/Engines/SoftAE/SoftAEStream.cpp
@@ -136,7 +136,9 @@ void CSoftAEStream::Initialize()
m_aeChannelLayout = AE.GetChannelLayout();
m_aeBytesPerFrame = AE_IS_RAW(m_initDataFormat) ? m_bytesPerFrame : (m_samplesPerFrame * sizeof(float));
- m_waterLevel = AE.GetSampleRate() / 2;
+ // set the waterlevel to 75 percent of the number of frames per second.
+ // this lets us drain the main buffer down futher before flagging an underrun.
+ m_waterLevel = AE.GetSampleRate() - (AE.GetSampleRate() / 4);
m_refillBuffer = m_waterLevel;
m_format.m_dataFormat = useDataFormat;
Please sign in to comment.
Something went wrong with that request. Please try again.