diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-01-03 22:59:21 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-01-03 22:59:21 +0000 |
commit | e7ed9710f6b4594b16ff1e311024500bf2fcc629 (patch) | |
tree | cf8a56e18d4748b00dc74e3388e06ad2e53327f4 /liba52 | |
parent | f6555d99d44cc05f00085e42b88d7bb4d8060a50 (diff) | |
download | mpv-e7ed9710f6b4594b16ff1e311024500bf2fcc629.tar.bz2 mpv-e7ed9710f6b4594b16ff1e311024500bf2fcc629.tar.xz |
mono ac3 support
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3968 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'liba52')
-rw-r--r-- | liba52/resample_c.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/liba52/resample_c.c b/liba52/resample_c.c index aa2d7a57ce..a618ec6e9e 100644 --- a/liba52/resample_c.c +++ b/liba52/resample_c.c @@ -20,6 +20,15 @@ static int a52_resample_MONO_to_5_C(float * _f, int16_t * s16){ return 5*256; } +static int a52_resample_MONO_to_1_C(float * _f, int16_t * s16){ + int i; + int32_t * f = (int32_t *) _f; + for (i = 0; i < 256; i++) { + s16[i] = convert (f[i]); + } + return 1*256; +} + static int a52_resample_STEREO_to_2_C(float * _f, int16_t * s16){ int i; int32_t * f = (int32_t *) _f; @@ -136,6 +145,7 @@ static void* a52_resample_C(int flags, int ch){ switch (flags) { case A52_MONO: if(ch==5) return a52_resample_MONO_to_5_C; + if(ch==1) return a52_resample_MONO_to_1_C; break; case A52_CHANNEL: case A52_STEREO: |