mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 15:45:19 +00:00
Properly dispose the sound
This commit is contained in:
parent
1499a7ec64
commit
13ef64769d
@ -404,11 +404,8 @@ audio_mixer_voice_t* audio_mixer_play(audio_mixer_sound_t* sound, bool repeat, f
|
|||||||
|
|
||||||
void audio_mixer_stop(audio_mixer_voice_t* voice)
|
void audio_mixer_stop(audio_mixer_voice_t* voice)
|
||||||
{
|
{
|
||||||
if (voice->type == AUDIO_MIXER_TYPE_WAV)
|
voice->stop_cb(voice, AUDIO_MIXER_SOUND_STOPPED);
|
||||||
{
|
audio_mixer_destroy(voice->sound);
|
||||||
voice->stop_cb(voice, AUDIO_MIXER_SOUND_STOPPED);
|
|
||||||
voice->type = AUDIO_MIXER_TYPE_NONE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mix_wav(float* buffer, size_t num_frames, audio_mixer_voice_t* voice)
|
static void mix_wav(float* buffer, size_t num_frames, audio_mixer_voice_t* voice)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user