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 088335b commit 07b1cc13cd15d02ea00d7f183b43be176252b4af @jyavenard jyavenard committed Nov 16, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 mythtv/libs/libmyth/audiooutputalsa.cpp
@@ -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,

0 comments on commit 07b1cc1

Please sign in to comment.