comparison libmpcodecs/ad_qtaudio.c @ 8123:9fc45fe0d444

*HUGE* set of compiler warning fixes, unused variables removal based on patch by Dominik Mierzejewski <dominik@rangers.eu.org>
author arpi
date Wed, 06 Nov 2002 23:54:29 +0000
parents 35d663ad0d95
children 8703835345e3
comparison
equal deleted inserted replaced
8122:272b1fda7287 8123:9fc45fe0d444
190 } 190 }
191 191
192 WantedBufferSize=OutputFormatInfo.numChannels*OutputFormatInfo.sampleRate*2; 192 WantedBufferSize=OutputFormatInfo.numChannels*OutputFormatInfo.sampleRate*2;
193 error = SoundConverterGetBufferSizes(myConverter, 193 error = SoundConverterGetBufferSizes(myConverter,
194 WantedBufferSize,&FramesToGet,&InputBufferSize,&OutputBufferSize); 194 WantedBufferSize,&FramesToGet,&InputBufferSize,&OutputBufferSize);
195 printf("SoundConverterGetBufferSizes:%i\n"); 195 printf("SoundConverterGetBufferSizes:%i\n",error);
196 printf("WantedBufferSize = %i\n",WantedBufferSize); 196 printf("WantedBufferSize = %li\n",WantedBufferSize);
197 printf("InputBufferSize = %i\n",InputBufferSize); 197 printf("InputBufferSize = %li\n",InputBufferSize);
198 printf("OutputBufferSize = %i\n",OutputBufferSize); 198 printf("OutputBufferSize = %li\n",OutputBufferSize);
199 printf("FramesToGet = %i\n",FramesToGet); 199 printf("FramesToGet = %li\n",FramesToGet);
200 200
201 InFrameSize=InputBufferSize/FramesToGet; 201 InFrameSize=InputBufferSize/FramesToGet;
202 OutFrameSize=OutputBufferSize/FramesToGet; 202 OutFrameSize=OutputBufferSize/FramesToGet;
203 203
204 printf("FrameSize: %i -> %i\n",InFrameSize,OutFrameSize); 204 printf("FrameSize: %i -> %i\n",InFrameSize,OutFrameSize);
254 if(FramesToGet*InFrameSize>sh->a_in_buffer_size) 254 if(FramesToGet*InFrameSize>sh->a_in_buffer_size)
255 FramesToGet=sh->a_in_buffer_size/InFrameSize; 255 FramesToGet=sh->a_in_buffer_size/InFrameSize;
256 256
257 InputBufferSize=FramesToGet*InFrameSize; 257 InputBufferSize=FramesToGet*InFrameSize;
258 258
259 printf("FramesToGet = %i (%i -> %i bytes)\n",FramesToGet, 259 printf("FramesToGet = %li (%li -> %li bytes)\n",FramesToGet,
260 InputBufferSize, FramesToGet*OutFrameSize); 260 InputBufferSize, FramesToGet*OutFrameSize);
261 261
262 if(InputBufferSize>sh->a_in_buffer_len){ 262 if(InputBufferSize>sh->a_in_buffer_len){
263 int x=demux_read_data(sh->ds,&sh->a_in_buffer[sh->a_in_buffer_len], 263 int x=demux_read_data(sh->ds,&sh->a_in_buffer[sh->a_in_buffer_len],
264 InputBufferSize-sh->a_in_buffer_len); 264 InputBufferSize-sh->a_in_buffer_len);
268 } 268 }
269 269
270 error = SoundConverterConvertBuffer(myConverter,sh->a_in_buffer, 270 error = SoundConverterConvertBuffer(myConverter,sh->a_in_buffer,
271 FramesToGet,buf,&ConvertedFrames,&ConvertedBytes); 271 FramesToGet,buf,&ConvertedFrames,&ConvertedBytes);
272 printf("SoundConverterConvertBuffer:%i\n",error); 272 printf("SoundConverterConvertBuffer:%i\n",error);
273 printf("ConvertedFrames = %i\n",ConvertedFrames); 273 printf("ConvertedFrames = %li\n",ConvertedFrames);
274 printf("ConvertedBytes = %i\n",ConvertedBytes); 274 printf("ConvertedBytes = %li\n",ConvertedBytes);
275 275
276 InputBufferSize=(ConvertedBytes/OutFrameSize)*InFrameSize; // FIXME!! 276 InputBufferSize=(ConvertedBytes/OutFrameSize)*InFrameSize; // FIXME!!
277 sh->a_in_buffer_len-=InputBufferSize; 277 sh->a_in_buffer_len-=InputBufferSize;
278 if(sh->a_in_buffer_len<0) sh->a_in_buffer_len=0; // should not happen... 278 if(sh->a_in_buffer_len<0) sh->a_in_buffer_len=0; // should not happen...
279 else if(sh->a_in_buffer_len>0){ 279 else if(sh->a_in_buffer_len>0){