From e7ed9710f6b4594b16ff1e311024500bf2fcc629 Mon Sep 17 00:00:00 2001 From: arpi Date: Thu, 3 Jan 2002 22:59:21 +0000 Subject: mono ac3 support git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3968 b3059339-0415-0410-9bf9-f77b7e298cf2 --- liba52/resample_c.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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: -- cgit v1.2.3