changeset 8389:e8c51ec86340

fixed in/out framesize rounding bug (causing low-rate QCLP hangup/looping) disabled TerminateQTML(), as it does carshing (due to patched InitializeQTML)
author arpi
date Sat, 07 Dec 2002 02:26:45 +0000
parents 45eb2d4d633c
children bcb7013ca366
files libmpcodecs/ad_qtaudio.c
diffstat 1 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/ad_qtaudio.c	Sat Dec 07 01:25:30 2002 +0000
+++ b/libmpcodecs/ad_qtaudio.c	Sat Dec 07 02:26:45 2002 +0000
@@ -201,7 +201,7 @@
     printf("OutputBufferSize = %li\n",OutputBufferSize);
     printf("FramesToGet = %li\n",FramesToGet);
     
-    InFrameSize=InputBufferSize/FramesToGet;
+    InFrameSize=(InputBufferSize+FramesToGet-1)/FramesToGet;
     OutFrameSize=OutputBufferSize/FramesToGet;
 
     printf("FrameSize: %i -> %i\n",InFrameSize,OutFrameSize);
@@ -249,11 +249,11 @@
     printf("SoundConverterEndConversion:%i\n",error);
     error = SoundConverterClose(myConverter);
     printf("SoundConverterClose:%i\n",error);
-    error = TerminateQTML();
-    printf("TerminateQTML:%i\n",error);
-    FreeLibrary( qtml_dll );
-    qtml_dll = NULL;
-    printf("qt dll loader uninit done\n");
+//    error = TerminateQTML();
+//    printf("TerminateQTML:%i\n",error);
+//    FreeLibrary( qtml_dll );
+//    qtml_dll = NULL;
+//    printf("qt dll loader uninit done\n");
 }
 
 static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen){
@@ -290,7 +290,8 @@
 //    printf("ConvertedFrames = %li\n",ConvertedFrames);
 //    printf("ConvertedBytes = %li\n",ConvertedBytes);
     
-    InputBufferSize=(ConvertedBytes/OutFrameSize)*InFrameSize; // FIXME!!
+//    InputBufferSize=(ConvertedBytes/OutFrameSize)*InFrameSize; // FIXME!!
+    InputBufferSize=FramesToGet*InFrameSize;
     sh->a_in_buffer_len-=InputBufferSize;
     if(sh->a_in_buffer_len<0) sh->a_in_buffer_len=0; // should not happen...
     else if(sh->a_in_buffer_len>0){