Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

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 04c15e14898db69477d4c4a42e8307e62de5b3ac 1 parent 44b6ab2
@jyavenard jyavenard authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 mythtv/libs/libmyth/audio/audiooutputalsa.cpp
5 mythtv/libs/libmyth/audio/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.