Skip to content

Commit

Permalink
[aml] fixed, add ifdefs for pivos changes
Browse files Browse the repository at this point in the history
  • Loading branch information
davilla committed Apr 30, 2013
1 parent dfaf472 commit d9119f2
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,15 +366,21 @@ bool CAESinkALSA::InitializeHW(AEAudioFormat &format)
after those are fixed.
*/
periodSize = std::min(periodSize, (snd_pcm_uframes_t) sampleRate / 20);
bufferSize = std::min(bufferSize, (snd_pcm_uframes_t) sampleRate / 4);
bufferSize = std::min(bufferSize, (snd_pcm_uframes_t) sampleRate / 5);

This comment has been minimized.

Copy link
@Memphiz

Memphiz May 2, 2013

Slipped in or by intention? ^^

This comment has been minimized.

Copy link
@davilla

davilla May 2, 2013

Author

by intention, mainline is 5

#if defined(HAS_AMLPLAYER) || defined(HAS_LIBAMCODEC)
// must be pot for pivos.
bufferSize = CheckNP2(bufferSize);

/*
#endif

/*
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 = CheckNP2(periodSize);
#if defined(HAS_AMLPLAYER) || defined(HAS_LIBAMCODEC)
// must be pot for pivos.
periodSize = CheckNP2(periodSize);
#endif

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

Expand Down

0 comments on commit d9119f2

Please sign in to comment.