summaryrefslogtreecommitdiffstats
path: root/libao2/ao_dsound.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-01-11 20:27:52 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-01-11 20:27:52 +0000
commit33bc71f10d0218a99128b6a786357f8c60ba821e (patch)
treef981d7109a26bccd2b06a07e348a6c9dc8b1bc54 /libao2/ao_dsound.c
parentd3ae3611ce366b7598c49094a94109c6ee504322 (diff)
downloadmpv-33bc71f10d0218a99128b6a786357f8c60ba821e.tar.bz2
mpv-33bc71f10d0218a99128b6a786357f8c60ba821e.tar.xz
Add support for distinguishing between little- and big-endian SPDIF AC3
and converting between both. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30283 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libao2/ao_dsound.c')
-rw-r--r--libao2/ao_dsound.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libao2/ao_dsound.c b/libao2/ao_dsound.c
index 8fbcfbe2fc..c53820638d 100644
--- a/libao2/ao_dsound.c
+++ b/libao2/ao_dsound.c
@@ -432,8 +432,11 @@ static int init(int rate, int channels, int format, int flags)
mp_msg(MSGT_AO, MSGL_ERR, "ao_dsound: 8 channel audio not yet supported\n");
return 0;
}
+
+ if (AF_FORMAT_IS_AC3(format))
+ format = AF_FORMAT_AC3_NE;
switch(format){
- case AF_FORMAT_AC3:
+ case AF_FORMAT_AC3_NE:
case AF_FORMAT_S24_LE:
case AF_FORMAT_S16_LE:
case AF_FORMAT_U8: