[MPlayer-cvslog] CVS: main/libao2 ao_oss.c,1.46,1.47
Roberto Togni CVS
syncmail at mplayerhq.hu
Tue Dec 28 02:59:14 CET 2004
CVS change done by Roberto Togni CVS
Update of /cvsroot/mplayer/main/libao2
In directory mail:/var2/tmp/cvs-serv21684
Modified Files:
ao_oss.c
Log Message:
100l set default format for AF_FORMATs not supported by sound card
Index: ao_oss.c
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/ao_oss.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- ao_oss.c 27 Dec 2004 17:30:13 -0000 1.46
+++ ao_oss.c 28 Dec 2004 01:59:12 -0000 1.47
@@ -256,15 +256,21 @@
ac3_retry:
ao_data.format=format;
oss_format=format2oss(format);
- if (oss_format == -1) return 0;
+ if (oss_format == -1) {
+#ifdef WORDS_BIGENDIAN
+ oss_format=AFMT_S16_BE;
+ format=AF_FORMAT_S16_BE;
+#else
+ oss_format=AFMT_S16_LE;
+ format=AF_FORMAT_S16_LE;
+#endif
+ }
if( ioctl(audio_fd, SNDCTL_DSP_SETFMT, &oss_format)<0 ||
oss_format != format2oss(format)) if(format == AF_FORMAT_AC3){
mp_msg(MSGT_AO,MSGL_WARN, MSGTR_AO_OSS_CantSetAC3, dsp);
#ifdef WORDS_BIGENDIAN
- oss_format=AFMT_S16_BE;
format=AF_FORMAT_S16_BE;
#else
- oss_format=AFMT_S16_LE;
format=AF_FORMAT_S16_LE;
#endif
goto ac3_retry;
More information about the MPlayer-cvslog
mailing list