Permalink
Browse files

Allows to change the ALSA buffer size

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...
1 parent 7010e3f commit cda928f41dad4fbdc29396247aed49fc344c19f5 @jyavenard jyavenard committed Nov 16, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 mythtv/libs/libmyth/audio/audiooutputalsa.cpp
@@ -430,7 +430,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,

0 comments on commit cda928f

Please sign in to comment.