Mercurial > SDL_sound_CoreAudio
diff alt_audio_convert.c @ 368:84d6c604eaa9
Fixes to interface with SDL_sound correctly by Torbjorn.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sat, 22 Jun 2002 23:19:41 +0000 |
parents | eda146d666d1 |
children | 1b463ef9bcc2 |
line wrap: on
line diff
--- a/alt_audio_convert.c Fri Jun 21 20:04:22 2002 +0000 +++ b/alt_audio_convert.c Sat Jun 22 23:19:41 2002 +0000 @@ -139,6 +139,7 @@ for( i = 0; Data->adapter[i] != NULL; i++ ) length = (*Data->adapter[i])( Temp, length); + Data->len_cvt = length; return length; } @@ -351,7 +352,7 @@ /*-------------------------------------------------------------------------*/ enum RateConverterType { varRate = 0, hlfRate = 1, dblRate = 2 }; static void initRateConverterBuffer( RateConverterBuffer *rcb, - AdapterC* Data, int length, RateConverterType r, int rel_size ) + AdapterC* Data, int length, enum RateConverterType r, int rel_size ) { int size, dir; int den[] = { 0, 1, 2}; @@ -707,7 +708,7 @@ if( IS_SYSENDIAN(dst) ) Data->adapter[filter_index++] = changeSigned16BitSys; else - Data->adapter[filter_index++] = changeSigned16BitSys; + Data->adapter[filter_index++] = changeSigned16BitWrong; } if( src.channels == 1 && dst.channels == 2 ) @@ -839,6 +840,8 @@ /* Set up the filter information */ sucess_exit: + if( filter_index > 0 ) + Data->needed = 1; /* !!! FIXME: Is it okay to assign NULL to a function pointer? Borland says no. -frank */ Data->adapter[filter_index] = NULL;