Skip to content
This repository has been archived by the owner on Sep 30, 2018. It is now read-only.

Commit

Permalink
[droid] raise waterlevel to reduce frame buffer underruns
Browse files Browse the repository at this point in the history
  • Loading branch information
davilla committed Jul 30, 2012
1 parent 6da41cb commit 73a7296
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion xbmc/cores/AudioEngine/Engines/SoftAE/SoftAEStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 0.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);

This comment has been minimized.

Copy link
@Memphiz

Memphiz Jul 31, 2012

Member

Is this so much faster then AE.GetSampleRate() * 0.75 ? ;)

This comment has been minimized.

Copy link
@davilla

davilla Jul 31, 2012

Author Contributor

no :) for some reason I wanted to keep the history of AE.GetSampleRate() / N

This comment has been minimized.

Copy link
@Memphiz

Memphiz Jul 31, 2012

Member

Me sips at the waterlevel - buuaehhhh - brackwater... haha

This comment has been minimized.

Copy link
@garbear

garbear Jul 31, 2012

Member

Ahaha Davilla I just wanna let you know, I always think to myself, In what way has Davilla optimized the shit out of this??

m_refillBuffer = m_waterLevel;

m_format.m_dataFormat = useDataFormat;
Expand Down

0 comments on commit 73a7296

Please sign in to comment.