Don't use the converted audio pointer unless we actually used converted audio...
authorSam Lantinga <slouken@libsdl.org>
Fri, 13 Jan 2012 03:46:01 -0500
changeset 5624129f7c1c68f
parent 561 87bdb4c81c0b
child 563 7bfa38509529
Don't use the converted audio pointer unless we actually used converted audio...
mixer.c
     1.1 --- a/mixer.c	Fri Jan 13 03:15:19 2012 -0500
     1.2 +++ b/mixer.c	Fri Jan 13 03:46:01 2012 -0500
     1.3 @@ -654,11 +654,12 @@
     1.4  			SDL_free(chunk);
     1.5  			return(NULL);
     1.6  		}
     1.7 +
     1.8 +		chunk->abuf = wavecvt.buf;
     1.9 +		chunk->alen = wavecvt.len_cvt;
    1.10  	}
    1.11  
    1.12  	chunk->allocated = 1;
    1.13 -	chunk->abuf = wavecvt.buf;
    1.14 -	chunk->alen = wavecvt.len_cvt;
    1.15  	chunk->volume = MIX_MAX_VOLUME;
    1.16  
    1.17  	return(chunk);