Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fix ALSA buffer allocation.

Changing the audio buffer size only works when the audio device is closed. So close it before attempting to open it. This only works if myth has write access
  • Loading branch information...
commit 14057823c9f43689f3cb8e68afa2912ee68b4390 1 parent 588cc6e
@jyavenard jyavenard authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 mythtv/libs/libmyth/audiooutputalsa.cpp
5 mythtv/libs/libmyth/audiooutputalsa.cpp
@@ -180,6 +180,11 @@ bool AudioOutputALSA::SetPreallocBufferSize(int size)
if (GetPCMInfo(card, device, subdevice) < 0)
return false;
+ // We can not increase the size of the audio buffer while device is opened
+ // so make sure it is closed
+ if (pcm_handle != NULL)
+ CloseDevice();
QFile pfile(QString("/proc/asound/card%1/pcm%2p/sub%3/prealloc")
Please sign in to comment.
Something went wrong with that request. Please try again.