[MPlayer-dev-eng] [PATCH] oss

Arpi arpi at thot.banki.hu
Wed Feb 6 10:11:21 CET 2002


Hi,

rtfm OSS specs. they don't recommend using DSP_RESET, and even if it's used,
all the paranmeters shoiuld be set again. as i experienced, everything noted
'not recommended' in that specs is only implemented in 20% of drivers...

> 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
> 
> 
> 
> 
> 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){
> 
> 
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
> 
> 


A'rpi / Astral & ESP-team

--
"I don't RTFM? Wow. What's the meaning of this? It's new for me."
	-- Martin Baum, a tipical MPlayer user...



More information about the MPlayer-dev-eng mailing list