mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-04 17:06:48 +00:00
Pass the correct structure to the callback
This commit is contained in:
parent
4a611b5096
commit
eb08a3dbef
@ -449,7 +449,7 @@ audio_mixer_voice_t* audio_mixer_play(audio_mixer_sound_t* sound, bool repeat,
|
||||
void audio_mixer_stop(audio_mixer_voice_t* voice)
|
||||
{
|
||||
if (voice && voice->stop_cb)
|
||||
voice->stop_cb(voice, AUDIO_MIXER_SOUND_STOPPED);
|
||||
voice->stop_cb(voice->sound, AUDIO_MIXER_SOUND_STOPPED);
|
||||
}
|
||||
|
||||
static void audio_mixer_mix_wav(float* buffer, size_t num_frames,
|
||||
@ -473,7 +473,7 @@ again:
|
||||
if (voice->repeat)
|
||||
{
|
||||
if (voice->stop_cb)
|
||||
voice->stop_cb(voice, AUDIO_MIXER_SOUND_REPEATED);
|
||||
voice->stop_cb(voice->sound, AUDIO_MIXER_SOUND_REPEATED);
|
||||
|
||||
buf_free -= pcm_available;
|
||||
pcm_available = sound->types.wav.frames * 2;
|
||||
@ -483,7 +483,7 @@ again:
|
||||
}
|
||||
|
||||
if (voice->stop_cb)
|
||||
voice->stop_cb(voice, AUDIO_MIXER_SOUND_FINISHED);
|
||||
voice->stop_cb(voice->sound, AUDIO_MIXER_SOUND_FINISHED);
|
||||
|
||||
voice->type = AUDIO_MIXER_TYPE_NONE;
|
||||
}
|
||||
@ -520,7 +520,7 @@ again:
|
||||
if (voice->repeat)
|
||||
{
|
||||
if (voice->stop_cb)
|
||||
voice->stop_cb(voice, AUDIO_MIXER_SOUND_REPEATED);
|
||||
voice->stop_cb(voice->sound, AUDIO_MIXER_SOUND_REPEATED);
|
||||
|
||||
stb_vorbis_seek_start(voice->types.ogg.stream);
|
||||
goto again;
|
||||
@ -528,7 +528,7 @@ again:
|
||||
else
|
||||
{
|
||||
if (voice->stop_cb)
|
||||
voice->stop_cb(voice, AUDIO_MIXER_SOUND_FINISHED);
|
||||
voice->stop_cb(voice->sound, AUDIO_MIXER_SOUND_FINISHED);
|
||||
|
||||
voice->type = AUDIO_MIXER_TYPE_NONE;
|
||||
return;
|
||||
|
@ -35,7 +35,7 @@ RETRO_BEGIN_DECLS
|
||||
typedef struct audio_mixer_sound audio_mixer_sound_t;
|
||||
typedef struct audio_mixer_voice audio_mixer_voice_t;
|
||||
|
||||
typedef void (*audio_mixer_stop_cb_t)(audio_mixer_voice_t* voice, unsigned reason);
|
||||
typedef void (*audio_mixer_stop_cb_t)(audio_mixer_sound_t* voice, unsigned reason);
|
||||
|
||||
/* Reasons passed to the stop callback. */
|
||||
#define AUDIO_MIXER_SOUND_FINISHED 0
|
||||
|
Loading…
Reference in New Issue
Block a user