changeset 7753:f569630d892f

set up ss_div/ss_mul properly, accept 'alaw' fourcc too
author arpi
date Wed, 16 Oct 2002 16:49:58 +0000
parents 18f8233094da
children 0568245deeb8
files libmpcodecs/ad_alaw.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/ad_alaw.c	Wed Oct 16 15:59:04 2002 +0000
+++ b/libmpcodecs/ad_alaw.c	Wed Oct 16 16:49:58 2002 +0000
@@ -31,6 +31,8 @@
 static int preinit(sh_audio_t *sh)
 {
   sh->audio_out_minsize=2048;
+  sh->ds->ss_div = 1; // 1 samples/packet
+  sh->ds->ss_mul = 1; // 1 bytes/packet
   return 1;
 }
 
@@ -61,7 +63,7 @@
  unsigned short *d=(unsigned short *) buf;
  unsigned char *s=buf;
  len=2*l;
- if(sh_audio->format==6){
+ if(sh_audio->format==6 || sh_audio->format==0x77616C61){
  /* aLaw */
    while(l>0){ --l; d[l]=alaw2short[s[l]]; }
  } else {