[MPlayer-cvslog] CVS: main/libao2 ao_oss.c,1.53,1.54

Alex Beregszaszi syncmail at mplayerhq.hu
Sun Jul 3 13:38:37 CEST 2005


CVS change done by Alex Beregszaszi

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

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.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- ao_oss.c	26 Feb 2005 23:03:53 -0000	1.53
+++ ao_oss.c	3 Jul 2005 11:38:35 -0000	1.54
@@ -160,8 +160,16 @@
 	case AOCONTROL_GET_DEVICE:
 	    *(char**)arg=dsp;
 	    return CONTROL_OK;
+#ifdef SNDCTL_DSP_GETFMTS
 	case AOCONTROL_QUERY_FORMAT:
-	    return CONTROL_TRUE;
+	{
+	    int format;
+	    if (!ioctl(audio_fd, SNDCTL_DSP_GETFMTS, &format))
+		if (format & (int)arg)
+	    	    return CONTROL_TRUE;
+	    return CONTROL_FALSE;
+	}
+#endif
 	case AOCONTROL_GET_VOLUME:
 	case AOCONTROL_SET_VOLUME:
 	{




More information about the MPlayer-cvslog mailing list