diff --git a/audio/audio_driver.c b/audio/audio_driver.c index d669ad0f66..a3c2f629f8 100644 --- a/audio/audio_driver.c +++ b/audio/audio_driver.c @@ -1047,6 +1047,19 @@ void audio_driver_destroy(void) current_audio = NULL; } +void audio_set_bool(enum audio_action action, bool val) +{ + switch (action) + { + case AUDIO_ACTION_MIXER: + audio_mixer_active = val; + break; + case AUDIO_ACTION_NONE: + default: + break; + } +} + void audio_set_float(enum audio_action action, float val) { switch (action) diff --git a/audio/audio_driver.h b/audio/audio_driver.h index d20aca26c4..e003e3fb69 100644 --- a/audio/audio_driver.h +++ b/audio/audio_driver.h @@ -37,7 +37,8 @@ enum audio_action { AUDIO_ACTION_NONE = 0, AUDIO_ACTION_RATE_CONTROL_DELTA, - AUDIO_ACTION_MUTE_ENABLE + AUDIO_ACTION_MUTE_ENABLE, + AUDIO_ACTION_MIXER }; typedef struct audio_driver @@ -218,6 +219,10 @@ void audio_driver_frame_is_reverse(void); void audio_set_float(enum audio_action action, float val); +void audio_set_bool(enum audio_action action, bool val); + +void audio_unset_bool(enum audio_action action, bool val); + float *audio_get_float_ptr(enum audio_action action); bool *audio_get_bool_ptr(enum audio_action action); diff --git a/retroarch.c b/retroarch.c index 8e96706c72..51c76d4ea3 100644 --- a/retroarch.c +++ b/retroarch.c @@ -2229,19 +2229,6 @@ bool runloop_msg_queue_pull(const char **ret) return true; } -#if 0 -static void runloop_upload_audio(void *task_data, - void *user_data, const char *err) -{ - audio_mixer_sound_t *handle = (audio_mixer_sound_t*)task_data; - - if (handle) - audio_mixer_play(handle, true, 1.0f, NULL); - - free(user_data); -} -#endif - /* Time to exit out of the main loop? * Reasons for exiting: * a) Shutdown environment callback was invoked. @@ -2612,7 +2599,7 @@ static enum runloop_state runloop_check_state( command_event(CMD_EVENT_RESET, NULL); #if 0 task_push_audio_mixer_load("/home/squarepusher/SumertimeBlues.ogg", - runloop_upload_audio, NULL); + NULL, NULL); #endif } diff --git a/tasks/task_audio_mixer.c b/tasks/task_audio_mixer.c index 65e32ba370..0a2bbdaae0 100644 --- a/tasks/task_audio_mixer.c +++ b/tasks/task_audio_mixer.c @@ -20,11 +20,13 @@ #include #include -#include #include