Skip to content

Commit

Permalink
Periodcount test
Browse files Browse the repository at this point in the history
  • Loading branch information
anssih committed Mar 16, 2013
1 parent e4969fe commit 5e7278f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
Expand Up @@ -341,14 +341,15 @@ bool CAESinkALSA::InitializeHW(AEAudioFormat &format)
will cause problems with menu sounds. Buffer will be increased
after those are fixed.
*/
periodSize = std::min(periodSize, (snd_pcm_uframes_t) sampleRate / 20);
periodSize = std::min(periodSize, (snd_pcm_uframes_t) sampleRate / 40);
bufferSize = std::min(bufferSize, (snd_pcm_uframes_t) sampleRate / 5);

/*
/*
* TODO UPDATE COMMENTS BEFORE PR
According to upstream we should set buffer size first - so make sure it is always at least
4x period size to not get underruns (some systems seem to have issues with only 2 periods)
*/
periodSize = std::min(periodSize, bufferSize / 4);
periodSize = std::min(periodSize, bufferSize / 8);

CLog::Log(LOGDEBUG, "CAESinkALSA::InitializeHW - Request: periodSize %lu, bufferSize %lu", periodSize, bufferSize);

Expand Down

0 comments on commit 5e7278f

Please sign in to comment.