[MPlayer-cvslog] CVS: main/libao2 ao_oss.c,1.45,1.46

Alex Beregszaszi syncmail at mplayerhq.hu
Sun Dec 19 18:11:21 CET 2004


CVS change done by Alex Beregszaszi

Update of /cvsroot/mplayer/main/libao2
In directory mail:/var2/tmp/cvs-serv19817

Modified Files:
	ao_oss.c 
Log Message:
query format support

Index: ao_oss.c
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/ao_oss.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- ao_oss.c	7 Dec 2004 02:24:15 -0000	1.45
+++ ao_oss.c	19 Dec 2004 17:11:19 -0000	1.46
@@ -50,7 +50,11 @@
 	    *(char**)arg=dsp;
 	    return CONTROL_OK;
 	case AOCONTROL_QUERY_FORMAT:
-	    return CONTROL_TRUE;
+	    int format;
+	    if (!ioctl(audio_fd, SNDCTL_DSP_GETFMT, &format))
+		if (format & (int)arg)
+	    	    return CONTROL_TRUE;
+	    return CONTROL_FALSE;
 	case AOCONTROL_GET_VOLUME:
 	case AOCONTROL_SET_VOLUME:
 	{




More information about the MPlayer-cvslog mailing list