From a1af27beb47a25c31a74e7623acb6713913e94f4 Mon Sep 17 00:00:00 2001 From: alex Date: Sun, 3 Jul 2005 11:38:35 +0000 Subject: [PATCH] QUERY_FORMAT support git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15899 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libao2/ao_oss.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/libao2/ao_oss.c b/libao2/ao_oss.c index 121aa009ea..393d8b065e 100644 --- a/libao2/ao_oss.c +++ b/libao2/ao_oss.c @@ -160,8 +160,16 @@ static int control(int cmd,void *arg){ 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: {