diff alt_audio_convert.c @ 421:a65440b3a057

Patched to compile.
author Ryan C. Gordon <icculus@icculus.org>
date Thu, 26 Sep 2002 04:39:41 +0000
parents 5b8a07b5162e
children 5b00e43ec23c
line wrap: on
line diff
--- a/alt_audio_convert.c	Thu Sep 26 04:34:35 2002 +0000
+++ b/alt_audio_convert.c	Thu Sep 26 04:39:41 2002 +0000
@@ -346,9 +346,12 @@
 static int convertMonoToStereo16Bit( AdapterC Data, int length )
 {
     int i;
+    Uint16* buffer;
+    Uint16* dst;
+
     length >>=1;
-    Uint16* buffer = (Uint16*)Data.buffer - 1;
-    Uint16* dst = (Uint16*)Data.buffer + 2*length - 2;
+    buffer = (Uint16*)Data.buffer - 1;
+    dst = (Uint16*)Data.buffer + 2*length - 2;
     for( i = length + 1; --i; dst-=2 )
          dst[0] = dst[1] = buffer[i];
     return 4*length;
@@ -502,8 +505,8 @@
 static int doubleRateStereo( AdapterC Data, int length )
 {
     Sint16* r;
+    RateConverterBuffer rcb;
     fprintf( stderr, "\n Buffer: %8x length: %8x\n", Data.buffer, length );
-    RateConverterBuffer rcb;
     initRateConverterBuffer( &rcb, &Data, length, Half );
     doRateConversion( &rcb, doubleRate2 );
     nextRateConverterBuffer( &rcb );
@@ -547,8 +550,8 @@
 static int increaseRateStereo( AdapterC Data, int length )
 {
     Sint16* r;
+    RateConverterBuffer rcb;
     fprintf( stderr, "\n Buffer: %8x length: %8x\n", Data.buffer, length );
-    RateConverterBuffer rcb;
     initRateConverterBuffer( &rcb, &Data, length, Data.filter->ratio );
     doRateConversion( &rcb, increaseRate2 );
     nextRateConverterBuffer( &rcb );
@@ -1009,7 +1012,7 @@
 
 int Sound_BuildAudioCVT(Sound_AudioCVT *Data,
     Uint16 src_format, Uint8 src_channels, int src_rate,
-    Uint16 dst_format, Uint8 dst_channels, int dst_rate )
+    Uint16 dst_format, Uint8 dst_channels, int dst_rate, Uint32 bufsize)
 {
     SDL_AudioSpec src, dst;
     int ret;