[Mplayer-cvslog] CVS: main/libao2 ao_oss.c,1.29,1.30

Alex Beregszaszi alex at mplayerhq.hu
Wed Aug 28 21:37:27 CEST 2002


Update of /cvsroot/mplayer/main/libao2
In directory mail:/var/tmp.root/cvs-serv1322

Modified Files:
	ao_oss.c 
Log Message:
release /dev/dsp on pause patch by Eric Lammerts <eric at lammerts.org> (and D Richard Felker III <dalias at aerifal.cx>)

Index: ao_oss.c
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/ao_oss.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- ao_oss.c	4 Aug 2002 18:33:26 -0000	1.29
+++ ao_oss.c	28 Aug 2002 19:37:13 -0000	1.30
@@ -225,10 +225,12 @@
 
 // close audio device
 static void uninit(){
+    if(audio_fd == -1) return;
 #ifdef SNDCTL_DSP_RESET
     ioctl(audio_fd, SNDCTL_DSP_RESET, NULL);
 #endif
     close(audio_fd);
+    audio_fd = -1;
 }
 
 // stop playing and empty buffers (for seeking/pause)
@@ -255,13 +257,13 @@
 // stop playing, keep buffers (for pause)
 static void audio_pause()
 {
-    // for now, just call reset();
-    reset();
+    uninit();
 }
 
 // resume playing, after audio_pause()
 static void audio_resume()
 {
+    reset();
 }
 
 




More information about the MPlayer-cvslog mailing list