# HG changeset patch # User faust3 # Date 1102499575 0 # Node ID 234295985ccd299fc08b1482b696e0cf740eb113 # Parent 8c839bb8a0764e610c35e2c442d0311367a3003d disable all unknown formats in the windows aos diff -r 8c839bb8a076 -r 234295985ccd libao2/ao_dsound.c --- a/libao2/ao_dsound.c Wed Dec 08 00:02:45 2004 +0000 +++ b/libao2/ao_dsound.c Wed Dec 08 09:52:55 2004 +0000 @@ -364,6 +364,17 @@ 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; diff -r 8c839bb8a076 -r 234295985ccd libao2/ao_win32.c --- a/libao2/ao_win32.c Wed Dec 08 00:02:45 2004 +0000 +++ b/libao2/ao_win32.c Wed Dec 08 09:52:55 2004 +0000 @@ -148,6 +148,16 @@ unsigned char* buffer; int i; + 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_win32: 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;