esound r508 - trunk
- From: jmouette svn gnome org
- To: svn-commits-list gnome org
- Subject: esound r508 - trunk
- Date: Tue, 18 Nov 2008 19:55:56 +0000 (UTC)
Author: jmouette
Date: Tue Nov 18 19:55:56 2008
New Revision: 508
URL: http://svn.gnome.org/viewvc/esound?rev=508&view=rev
Log:
* audio_alsa09.c: Call snd_pcm_hw_free() before
snd_pcm_close(). This closes the file descriptor to the sound
device even if the device is not physically present any more.
This fixes the esound/hotplug deadlock when removing a
currently active sound device.
Modified:
trunk/ChangeLog
trunk/audio_alsa09.c
Modified: trunk/audio_alsa09.c
==============================================================================
--- trunk/audio_alsa09.c (original)
+++ trunk/audio_alsa09.c Tue Nov 18 19:55:56 2008
@@ -389,10 +389,14 @@
print_state();
}
- if (alsa_playback_handle != NULL)
+ if (alsa_playback_handle != NULL) {
+ snd_pcm_hw_free( alsa_playback_handle );
snd_pcm_close( alsa_playback_handle );
- if (alsa_capture_handle != NULL)
+ }
+ if (alsa_capture_handle != NULL) {
+ snd_pcm_hw_free( alsa_capture_handle );
snd_pcm_close(alsa_capture_handle);
+ }
alsa_playback_handle = NULL;
alsa_capture_handle = NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]