From ecb5105a2cb4a476115f232b435ed2f0abf21279 Mon Sep 17 00:00:00 2001 From: faust3 Date: Wed, 8 Dec 2004 09:52:55 +0000 Subject: disable all unknown formats in the windows aos git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14136 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libao2/ao_dsound.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libao2/ao_dsound.c') diff --git a/libao2/ao_dsound.c b/libao2/ao_dsound.c index 21c293a380..0344c7410e 100644 --- a/libao2/ao_dsound.c +++ b/libao2/ao_dsound.c @@ -364,6 +364,17 @@ static int init(int rate, int channels, int format, int flags) DSBUFFERDESC dsbpridesc; DSBUFFERDESC dsbdesc; + //check if the format is supported in general + switch(format){ + case AFMT_AC3: + case AFMT_S24_LE: + case AFMT_S16_LE: + case AFMT_S8: + break; + default: + mp_msg(MSGT_AO, MSGL_V,"ao_dsound: format %s not supported defaulting to Signed 16-bit Little-Endian\n",audio_out_format_name(format)); + format=AFMT_S16_LE; + } //fill global ao_data ao_data.channels = channels; ao_data.samplerate = rate; -- cgit v1.2.3