Skip to content

Commit

Permalink
Allows to change the ALSA buffer size
Browse files Browse the repository at this point in the history
In what is likely an ALSA bug, sometimes requiring 500ms buffer fails. Add a ALSABufferOverride parameter that allows to override the value. Value is in milliseconds.
  • Loading branch information
jyavenard committed Nov 16, 2011
1 parent 088335b commit 07b1cc1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mythtv/libs/libmyth/audiooutputalsa.cpp
Expand Up @@ -427,7 +427,9 @@ bool AudioOutputALSA::OpenDevice()
return false;
}

buffer_time = 500000; // buffer 0.5s worth of samples
// buffer 0.5s worth of samples
buffer_time = gCoreContext->GetNumSetting("ALSABufferOverride", 500) * 1000;

period_time = 4; // aim for an interrupt every (1/4th of buffer_time)

err = SetParameters(pcm_handle, format, channels, samplerate,
Expand Down

0 comments on commit 07b1cc1

Please sign in to comment.