[MPlayer-dev-eng] [PATCH] oss
David Holm
david at realityrift.com
Wed Feb 6 09:21:38 CET 2002
Hi,
here is a patch to use SNDCTL_DSP_RESET in ao_oss on a reset, it seems
strange not to use it but instead run uninit and reopen the device (=
time consuming).
If it's due to compatibility issues just add an "#ifdef
SNDCTL_DSP_RESET" before my 2 line adddition and an "#endif" after it.
//David
-------------- next part --------------
Index: libao2/ao_oss.c
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/ao_oss.c,v
retrieving revision 1.17
diff -u -r1.17 ao_oss.c
--- libao2/ao_oss.c 15 Jan 2002 22:55:28 -0000 1.17
+++ libao2/ao_oss.c 6 Feb 2002 08:30:32 -0000
@@ -207,6 +207,8 @@
// stop playing and empty buffers (for seeking/pause)
static void reset(){
+ if(!(ioctl(audio_fd,SNDCTL_DSP_RESET,NULL) < 0))
+ return;
uninit();
audio_fd=open(dsp, O_WRONLY);
if(audio_fd<0){
More information about the MPlayer-dev-eng
mailing list