fix leak
This commit is contained in:
parent
04ab037d3f
commit
712c063c42
2 changed files with 4 additions and 1 deletions
|
|
@ -103,6 +103,8 @@ void GSSoundClose(GSSound sound) {
|
|||
|
||||
if(sound->from_samplerate > 0) ma_resampler_uninit(&sound->resampler, NULL);
|
||||
|
||||
if(sound->from_channel != 2) ma_channel_converter_uninit(&sound->converter, NULL);
|
||||
|
||||
free(sound);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -60,9 +60,10 @@ static void read_callback(void* opaque, GSI16* out, int frame) {
|
|||
memset(result3, 0, sizeof(*result3) * frame * 2);
|
||||
|
||||
ma_channel_converter_process_pcm_frames(&sengine->sound[i]->converter, result3, result2, frame);
|
||||
for(j = 0; j < s * 2; j++) buffer[j] += (GSNumber)result3[j] / 32767;
|
||||
}
|
||||
|
||||
for(j = 0; j < s * 2; j++) buffer[j] += (GSNumber)result3[j] / 32767;
|
||||
|
||||
if(result3 != result2) free(result3);
|
||||
if(result2 != result) free(result2);
|
||||
} else if(sengine->sound[i]->loop && sengine->sound[i]->reset != NULL) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue