summaryrefslogtreecommitdiffstats
path: root/dec_audio.c
diff options
context:
space:
mode:
authorjkeil <jkeil@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-07-14 16:58:55 +0000
committerjkeil <jkeil@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-07-14 16:58:55 +0000
commit61bce79d66481ba912d398cb96f313f104e9fe31 (patch)
treee051e4ee75d58c00a1431e80b3f7c1038e6a17e7 /dec_audio.c
parent7b813ca0ec725307c44d8663908da63f74c33035 (diff)
downloadmpv-61bce79d66481ba912d398cb96f313f104e9fe31.tar.bz2
mpv-61bce79d66481ba912d398cb96f313f104e9fe31.tar.xz
On big-endian architectures, all audio decoders default to big-endian 16-bit
audio sample format. Add support to play both big- and little-endian 16-bit audio format to the sun audio_out driver. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1321 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'dec_audio.c')
-rw-r--r--dec_audio.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/dec_audio.c b/dec_audio.c
index 1b3d482000..22f9ab6cf9 100644
--- a/dec_audio.c
+++ b/dec_audio.c
@@ -61,7 +61,11 @@ extern int init_acm_audio_codec(sh_audio_t *sh_audio);
extern int acm_decode_audio(sh_audio_t *sh_audio, void* a_buffer,int minlen,int maxlen);
sh_audio->samplesize=2;
+#if WORDS_BIGENDIAN
+sh_audio->sample_format=AFMT_S16_BE;
+#else
sh_audio->sample_format=AFMT_S16_LE;
+#endif
sh_audio->samplerate=0;
//sh_audio->pcm_bswap=0;