[MPlayer-cvslog] CVS: main/libao2 ao_win32.c, 1.17, 1.18 ao_dsound.c, 1.4, 1.5
Sascha Sommer CVS
syncmail at mplayerhq.hu
Wed Dec 8 10:52:58 CET 2004
CVS change done by Sascha Sommer CVS
Update of /cvsroot/mplayer/main/libao2
In directory mail:/var2/tmp/cvs-serv9284/libao2
Modified Files:
ao_win32.c ao_dsound.c
Log Message:
disable all unknown formats in the windows aos
Index: ao_win32.c
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/ao_win32.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- ao_win32.c 7 Dec 2004 02:24:15 -0000 1.17
+++ ao_win32.c 8 Dec 2004 09:52:55 -0000 1.18
@@ -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;
Index: ao_dsound.c
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/ao_dsound.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ao_dsound.c 7 Dec 2004 02:24:15 -0000 1.4
+++ ao_dsound.c 8 Dec 2004 09:52:55 -0000 1.5
@@ -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;
More information about the MPlayer-cvslog
mailing list