mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-30 19:50:24 +00:00
Move audio_driver_mixer_volume_gain to runloop_state struct
This commit is contained in:
parent
22a2b5ac1c
commit
98448960f5
10
retroarch.c
10
retroarch.c
@ -28453,10 +28453,10 @@ static void audio_driver_flush(
|
||||
|
||||
if (!audio_mixer_mute_enable)
|
||||
{
|
||||
if (p_rarch->audio_driver_mixer_volume_gain == 1.0f)
|
||||
if (runloop_state.audio_mixer_volume_gain == 1.0f)
|
||||
override = false;
|
||||
mixer_gain =
|
||||
p_rarch->audio_driver_mixer_volume_gain;
|
||||
runloop_state.audio_mixer_volume_gain;
|
||||
}
|
||||
audio_mixer_mix(
|
||||
runloop_state.audio_output_samples_buf,
|
||||
@ -29508,8 +29508,6 @@ void audio_driver_frame_is_reverse(void)
|
||||
|
||||
void audio_set_float(enum audio_action action, float val)
|
||||
{
|
||||
struct rarch_state *p_rarch = &rarch_st;
|
||||
|
||||
switch (action)
|
||||
{
|
||||
case AUDIO_ACTION_VOLUME_GAIN:
|
||||
@ -29517,11 +29515,11 @@ void audio_set_float(enum audio_action action, float val)
|
||||
break;
|
||||
case AUDIO_ACTION_MIXER_VOLUME_GAIN:
|
||||
#ifdef HAVE_AUDIOMIXER
|
||||
p_rarch->audio_driver_mixer_volume_gain = DB_TO_GAIN(val);
|
||||
runloop_state.audio_mixer_volume_gain = DB_TO_GAIN(val);
|
||||
#endif
|
||||
break;
|
||||
case AUDIO_ACTION_RATE_CONTROL_DELTA:
|
||||
runloop_state.audio_rate_control_delta = val;
|
||||
runloop_state.audio_rate_control_delta = val;
|
||||
break;
|
||||
case AUDIO_ACTION_NONE:
|
||||
default:
|
||||
|
@ -1721,6 +1721,9 @@ struct runloop
|
||||
float audio_rate_control_delta;
|
||||
float audio_input_sample_rate;
|
||||
float audio_volume_gain;
|
||||
#ifdef HAVE_AUDIOMIXER
|
||||
float audio_mixer_volume_gain;
|
||||
#endif
|
||||
|
||||
bool audio_active;
|
||||
bool audio_use_float;
|
||||
@ -2075,10 +2078,6 @@ struct rarch_state
|
||||
float video_driver_core_hz;
|
||||
float video_driver_aspect_ratio;
|
||||
|
||||
#ifdef HAVE_AUDIOMIXER
|
||||
float audio_driver_mixer_volume_gain;
|
||||
#endif
|
||||
|
||||
float input_driver_axis_threshold;
|
||||
|
||||
enum osk_type osk_idx;
|
||||
|
Loading…
Reference in New Issue
Block a user