mirror of
https://github.com/libretro/RetroArch
synced 2025-02-07 12:39:54 +00:00
98 lines
2.9 KiB
Diff
98 lines
2.9 KiB
Diff
diff --git a/audio/audio_driver.c b/audio/audio_driver.c
|
|
index 3209354b19..caf10dbed2 100644
|
|
--- a/audio/audio_driver.c
|
|
+++ b/audio/audio_driver.c
|
|
@@ -606,7 +606,6 @@ static void audio_driver_flush(const int16_t *data, size_t samples)
|
|
src_data.data_in = audio_driver_input_data;
|
|
src_data.input_frames = samples >> 1;
|
|
|
|
-
|
|
if (audio_driver_dsp)
|
|
{
|
|
struct retro_dsp_data dsp_data;
|
|
@@ -722,6 +721,19 @@ void audio_driver_sample(int16_t left, int16_t right)
|
|
audio_driver_data_ptr = 0;
|
|
}
|
|
|
|
+void audio_driver_menu_sample(void)
|
|
+{
|
|
+ static unsigned count = 0;
|
|
+ audio_driver_output_samples_conv_buf[count++] = 0;
|
|
+ audio_driver_output_samples_conv_buf[count++] = 0;
|
|
+
|
|
+ if (audio_driver_data_ptr < audio_driver_chunk_size)
|
|
+ return;
|
|
+
|
|
+ audio_driver_flush(audio_driver_output_samples_conv_buf,
|
|
+ count);
|
|
+}
|
|
+
|
|
/**
|
|
* audio_driver_sample_batch:
|
|
* @data : pointer to audio buffer.
|
|
diff --git a/audio/audio_driver.h b/audio/audio_driver.h
|
|
index 6dfacaa89f..e5c37a344c 100644
|
|
--- a/audio/audio_driver.h
|
|
+++ b/audio/audio_driver.h
|
|
@@ -271,6 +271,8 @@ bool audio_driver_deinit(void);
|
|
|
|
bool audio_driver_init(void);
|
|
|
|
+void audio_driver_menu_sample(void);
|
|
+
|
|
bool audio_driver_mixer_add_stream(audio_mixer_stream_params_t *params);
|
|
|
|
enum resampler_quality audio_driver_get_resampler_quality(void);
|
|
diff --git a/menu/menu_driver.c b/menu/menu_driver.c
|
|
index 45580c12f5..894cbf56bc 100644
|
|
--- a/menu/menu_driver.c
|
|
+++ b/menu/menu_driver.c
|
|
@@ -1683,8 +1683,10 @@ static void menu_driver_toggle(bool on)
|
|
/* Stop all rumbling before entering the menu. */
|
|
command_event(CMD_EVENT_RUMBLE_STOP, NULL);
|
|
|
|
+#if 0
|
|
if (pause_libretro)
|
|
command_event(CMD_EVENT_AUDIO_STOP, NULL);
|
|
+#endif
|
|
|
|
/* Override keyboard callback to redirect to menu instead.
|
|
* We'll use this later for something ... */
|
|
@@ -1702,8 +1704,10 @@ static void menu_driver_toggle(bool on)
|
|
if (!rarch_ctl(RARCH_CTL_IS_SHUTDOWN, NULL))
|
|
driver_set_nonblock_state();
|
|
|
|
+#if 0
|
|
if (pause_libretro)
|
|
command_event(CMD_EVENT_AUDIO_START, NULL);
|
|
+#endif
|
|
|
|
/* Restore libretro keyboard callback. */
|
|
if (key_event && frontend_key_event)
|
|
diff --git a/retroarch.c b/retroarch.c
|
|
index 537ed82f37..29df4434b0 100644
|
|
--- a/retroarch.c
|
|
+++ b/retroarch.c
|
|
@@ -2608,6 +2608,7 @@ static enum runloop_state runloop_check_state(
|
|
|
|
retro_ctx.poll_cb();
|
|
|
|
+
|
|
{
|
|
enum menu_action action;
|
|
bool focused = false;
|
|
@@ -2627,10 +2628,13 @@ static enum runloop_state runloop_check_state(
|
|
rarch_menu_running_finished();
|
|
|
|
if (focused || !runloop_idle)
|
|
+ {
|
|
menu_driver_render(runloop_idle, rarch_is_inited,
|
|
(current_core_type == CORE_TYPE_DUMMY)
|
|
)
|
|
;
|
|
+ audio_driver_menu_sample();
|
|
+ }
|
|
|
|
old_input = current_input;
|
|
|