changeset 4423:ed500b952d2d

possible AC3 fix, by Marcus Blomenkamp <Marcus.Blomenkamp@epost.de>
author arpi
date Wed, 30 Jan 2002 22:05:46 +0000
parents 3a46354aab56
children 561de830fdf1
files dec_audio.c
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/dec_audio.c	Wed Jan 30 22:02:57 2002 +0000
+++ b/dec_audio.c	Wed Jan 30 22:05:46 2002 +0000
@@ -320,7 +320,7 @@
 int driver=sh_audio->codec->driver;
 
 sh_audio->samplesize=2;
-#if WORDS_BIGENDIAN
+#ifdef WORDS_BIGENDIAN
 sh_audio->sample_format=AFMT_S16_BE;
 #else
 sh_audio->sample_format=AFMT_S16_LE;
@@ -405,8 +405,9 @@
 case AFM_HWAC3:
   // Dolby AC3 audio:
   sh_audio->audio_out_minsize=4*256*6;
-  sh_audio->sample_format = AFMT_AC3;
-  sh_audio->channels=1;
+//  sh_audio->sample_format = AFMT_AC3;
+//  sh_audio->sample_format = AFMT_S16_LE;
+  sh_audio->channels=2;
   break;
 case AFM_GSM:
   // MS-GSM audio codec:
@@ -630,8 +631,8 @@
 
   // o_bps is calculated from samplesize*channels*samplerate
   // a single ac3 frame is always translated to 6144 byte packet. (zero padding)
-  sh_audio->channels=1;
-  sh_audio->samplesize=4;   // 1*4*(6*256) = 6144 (very TRICKY!)
+  sh_audio->channels=2;
+  sh_audio->samplesize=2;   // 2*2*(6*256) = 6144 (very TRICKY!)
 
   break;
 }