diff options
Diffstat (limited to 'libao2/ao_dsound.c')
-rw-r--r-- | libao2/ao_dsound.c | 11 |
1 files changed, 11 insertions, 0 deletions
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; |