Ticket #1598: alsa-params.patch
File alsa-params.patch, 1.3 KB (added by , 18 years ago) |
---|
-
mythtv/libs/libmyth/audiooutputalsa.cpp
48 48 QString real_device = audiodevice; 49 49 if (audio_passthru) 50 50 real_device.append(":{ AES0 0x02 }"); 51 51 52 52 err = snd_pcm_open(&pcm_handle, real_device, 53 SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK);53 SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK); 54 54 55 55 if (err < 0) 56 { 57 Error(QString("snd_pcm_open(%1): %2") 58 .arg(audiodevice).arg(snd_strerror(err))); 59 if (pcm_handle) 60 CloseDevice(); 61 return false; 56 { 57 // Maybe the driver didn't like the extra parameters. Try again without 58 err = snd_pcm_open(&pcm_handle, audiodevice, 59 SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK); 60 61 if (err < 0) 62 { 63 Error(QString("snd_pcm_open(%1): %2") 64 .arg(audiodevice).arg(snd_strerror(err))); 65 if (pcm_handle) 66 CloseDevice(); 67 return false; 68 } 62 69 } 63 70 64 71 /* the audio fragment size was computed by using the next lower power of 2