src/audio/SDL_audio.c
branchSDL-1.2
changeset 3884 dba874934f0c
parent 3881 c1b6bb5205f1
child 3888 6d2e1961661a
equal deleted inserted replaced
3883:cfe850b334e7 3884:dba874934f0c
   588 					audio->spec.freq) < 0 ) {
   588 					audio->spec.freq) < 0 ) {
   589 			SDL_CloseAudio();
   589 			SDL_CloseAudio();
   590 			return(-1);
   590 			return(-1);
   591 		}
   591 		}
   592 		if ( audio->convert.needed ) {
   592 		if ( audio->convert.needed ) {
   593 			audio->convert.len = desired->size;
   593 			audio->convert.len = (int) ( ((double) desired->size) /
       
   594                                           audio->convert.len_ratio );
   594 			audio->convert.buf =(Uint8 *)SDL_AllocAudioMem(
   595 			audio->convert.buf =(Uint8 *)SDL_AllocAudioMem(
   595 			   audio->convert.len*audio->convert.len_mult);
   596 			   audio->convert.len*audio->convert.len_mult);
   596 			if ( audio->convert.buf == NULL ) {
   597 			if ( audio->convert.buf == NULL ) {
   597 				SDL_CloseAudio();
   598 				SDL_CloseAudio();
   598 				SDL_OutOfMemory();
   599 				SDL_OutOfMemory();