Merge pull request #41 from libretro/master

RA update
This commit is contained in:
alphanu1 2018-04-30 16:30:57 +01:00 committed by GitHub
commit e6dd809c8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
41 changed files with 739 additions and 205 deletions

View File

@ -1,4 +1,12 @@
# 1.7.3 (future)
- AUDIO: Audio mixer supports FLAC/MP3 file types now!
- COMMON: Fixed bug 'crashing in cores that don't range check retro_set_controller_type'. Some people were having crashes when device is set to RETRO_DEVICE_NONE and the cores don't check the number of ports, in VBAM's case it was overflowing and crashing. QuickNES was crashing too.
- HID: Merge new HID subsystem.
- HID: Fix WaveBird support for the Wii U GCA.
- LOCALIZATION: Update Italian translation.
- MENU: Audio mixer now works in the menu without any cores loaded. You have to enable the setting 'Enable menu audio' for this to work.
- SCANNER: Add Wii Backup File WBFS support.
- X11: CRT SwitchRes support for X11/Linux.
# 1.7.2
- ANDROID/OPENSL: Prevent crashes when setting audio latency too low (buffer count can never be lower than 2 now).

View File

@ -45,8 +45,6 @@
#define AUDIO_BUFFER_FREE_SAMPLES_COUNT (8 * 1024)
#define AUDIO_MIXER_MAX_STREAMS 8
static const audio_driver_t *audio_drivers[] = {
#ifdef HAVE_ALSA
&audio_alsa,
@ -122,18 +120,6 @@ static const audio_driver_t *audio_drivers[] = {
NULL,
};
struct audio_mixer_stream
{
audio_mixer_sound_t *handle;
audio_mixer_voice_t *voice;
audio_mixer_stop_cb_t stop_cb;
enum audio_mixer_state state;
float volume;
void *buf;
size_t bufsize;
};
static unsigned audio_mixer_current_max_idx = 0;
static struct audio_mixer_stream audio_mixer_streams[AUDIO_MIXER_MAX_STREAMS] = {{0}};
static size_t audio_driver_chunk_size = 0;
@ -193,6 +179,13 @@ enum resampler_quality audio_driver_get_resampler_quality(void)
return (enum resampler_quality)settings->uints.audio_resampler_quality;
}
audio_mixer_stream_t *audio_driver_mixer_get_stream(unsigned i)
{
if (i > (AUDIO_MIXER_MAX_STREAMS-1))
return NULL;
return &audio_mixer_streams[i];
}
/**
* compute_audio_buffer_statistics:
*
@ -722,6 +715,22 @@ void audio_driver_sample(int16_t left, int16_t right)
audio_driver_data_ptr = 0;
}
void audio_driver_menu_sample(void)
{
static int16_t samples_buf[1024] = {0};
struct retro_system_av_info
*av_info = video_viewport_get_system_av_info();
const struct retro_system_timing *info =
(const struct retro_system_timing*)&av_info->timing;
unsigned sample_count = (info->sample_rate / info->fps) * 2;
while (sample_count > 1024)
{
audio_driver_flush(samples_buf, 1024);
sample_count -= 1024;
}
audio_driver_flush(samples_buf, sample_count);
}
/**
* audio_driver_sample_batch:
* @data : pointer to audio buffer.
@ -837,13 +846,13 @@ void audio_driver_monitor_adjust_system_rates(void)
{
float timing_skew;
settings_t *settings = config_get_ptr();
struct retro_system_av_info *av_info = video_viewport_get_system_av_info();
float video_refresh_rate = settings->floats.video_refresh_rate;
float max_timing_skew = settings->floats.audio_max_timing_skew;
const struct retro_system_timing *info = av_info ?
(const struct retro_system_timing*)&av_info->timing : NULL;
struct retro_system_av_info *av_info = video_viewport_get_system_av_info();
const struct retro_system_timing *info =
(const struct retro_system_timing*)&av_info->timing;
if (!info || info->sample_rate <= 0.0)
if (info->sample_rate <= 0.0)
return;
timing_skew = fabs(1.0f - info->fps / video_refresh_rate);
@ -1024,18 +1033,12 @@ static void audio_mixer_play_stop_cb(
{
unsigned i = (unsigned)idx;
#if 0
if (audio_mixer_streams[i].buf != NULL)
free(audio_mixer_streams[i].buf);
#endif
audio_mixer_streams[i].state = AUDIO_STREAM_STATE_NONE;
audio_mixer_streams[i].volume = 0.0f;
audio_mixer_streams[i].buf = NULL;
audio_mixer_streams[i].stop_cb = NULL;
audio_mixer_streams[i].handle = NULL;
audio_mixer_streams[i].voice = NULL;
audio_mixer_current_max_idx--;
}
break;
case AUDIO_MIXER_SOUND_STOPPED:
@ -1045,15 +1048,31 @@ static void audio_mixer_play_stop_cb(
}
}
bool audio_driver_mixer_get_free_stream_slot(unsigned *id)
{
unsigned i;
for (i = 0; i < AUDIO_MIXER_MAX_STREAMS; i++)
{
if (audio_mixer_streams[i].state == AUDIO_STREAM_STATE_NONE)
{
*id = i;
return true;
}
}
return false;
}
bool audio_driver_mixer_add_stream(audio_mixer_stream_params_t *params)
{
unsigned free_slot = 0;
audio_mixer_voice_t *voice = NULL;
audio_mixer_sound_t *handle = NULL;
audio_mixer_stop_cb_t stop_cb = audio_mixer_play_stop_cb;
bool looped = false;
void *buf = NULL;
if (audio_mixer_current_max_idx >= AUDIO_MIXER_MAX_STREAMS)
if (!audio_driver_mixer_get_free_stream_slot(&free_slot))
return false;
if (params->state == AUDIO_STREAM_STATE_NONE)
@ -1101,71 +1120,140 @@ bool audio_driver_mixer_add_stream(audio_mixer_stream_params_t *params)
if (params->state == AUDIO_STREAM_STATE_PLAYING)
{
voice = audio_mixer_play(handle, looped, params->volume, stop_cb);
audio_set_bool(AUDIO_ACTION_MIXER, true);
audio_mixer_active = true;
}
else if (params->state == AUDIO_STREAM_STATE_PLAYING_LOOPED)
{
looped = true;
voice = audio_mixer_play(handle, looped, params->volume, stop_cb);
audio_set_bool(AUDIO_ACTION_MIXER, true);
audio_mixer_active = true;
}
audio_mixer_streams[audio_mixer_current_max_idx].buf = buf;
audio_mixer_streams[audio_mixer_current_max_idx].handle = handle;
audio_mixer_streams[audio_mixer_current_max_idx].voice = voice;
audio_mixer_streams[audio_mixer_current_max_idx].state = params->state;
audio_mixer_streams[audio_mixer_current_max_idx].volume = params->volume;
audio_mixer_streams[audio_mixer_current_max_idx].stop_cb = stop_cb;
audio_mixer_current_max_idx++;
audio_mixer_streams[free_slot].buf = buf;
audio_mixer_streams[free_slot].handle = handle;
audio_mixer_streams[free_slot].voice = voice;
audio_mixer_streams[free_slot].state = params->state;
audio_mixer_streams[free_slot].volume = params->volume;
audio_mixer_streams[free_slot].stop_cb = stop_cb;
return true;
}
static void audio_driver_mixer_remove_stream(unsigned i)
enum audio_mixer_state audio_driver_mixer_get_stream_state(unsigned i)
{
audio_mixer_sound_t *handle = audio_mixer_streams[i].handle;
audio_mixer_voice_t *voice = audio_mixer_streams[i].voice;
if (i >= AUDIO_MIXER_MAX_STREAMS)
return AUDIO_STREAM_STATE_NONE;
return audio_mixer_streams[i].state;
}
static void audio_driver_mixer_play_stream_internal(unsigned i, bool looped)
{
bool set_state = false;
if (i >= AUDIO_MIXER_MAX_STREAMS)
return;
switch (audio_mixer_streams[i].state)
{
case AUDIO_STREAM_STATE_STOPPED:
audio_mixer_streams[i].voice = audio_mixer_play(audio_mixer_streams[i].handle, looped, audio_mixer_streams[i].volume, audio_mixer_streams[i].stop_cb);
set_state = true;
break;
case AUDIO_STREAM_STATE_PLAYING:
case AUDIO_STREAM_STATE_PLAYING_LOOPED:
case AUDIO_STREAM_STATE_NONE:
break;
}
if (set_state)
audio_mixer_streams[i].state = looped ? AUDIO_STREAM_STATE_PLAYING_LOOPED : AUDIO_STREAM_STATE_PLAYING;
}
void audio_driver_mixer_play_stream(unsigned i)
{
audio_driver_mixer_play_stream_internal(i, false);
}
void audio_driver_mixer_play_stream_looped(unsigned i)
{
audio_driver_mixer_play_stream_internal(i, true);
}
void audio_driver_mixer_stop_stream(unsigned i)
{
bool set_state = false;
if (i >= AUDIO_MIXER_MAX_STREAMS)
return;
switch (audio_mixer_streams[i].state)
{
case AUDIO_STREAM_STATE_PLAYING:
if (voice)
audio_mixer_stop(voice);
if (handle)
audio_mixer_destroy(handle);
break;
case AUDIO_STREAM_STATE_PLAYING_LOOPED:
if (voice)
audio_mixer_stop(voice);
if (handle)
audio_mixer_destroy(handle);
set_state = true;
break;
case AUDIO_STREAM_STATE_STOPPED:
if (handle)
audio_mixer_destroy(handle);
case AUDIO_STREAM_STATE_NONE:
break;
}
if (set_state)
{
audio_mixer_voice_t *voice = audio_mixer_streams[i].voice;
if (voice)
audio_mixer_stop(voice);
audio_mixer_streams[i].state = AUDIO_STREAM_STATE_STOPPED;
}
}
void audio_driver_mixer_remove_stream(unsigned i)
{
bool destroy = false;
if (i >= AUDIO_MIXER_MAX_STREAMS)
return;
switch (audio_mixer_streams[i].state)
{
case AUDIO_STREAM_STATE_PLAYING:
case AUDIO_STREAM_STATE_PLAYING_LOOPED:
audio_driver_mixer_stop_stream(i);
destroy = true;
break;
case AUDIO_STREAM_STATE_STOPPED:
destroy = true;
break;
case AUDIO_STREAM_STATE_NONE:
break;
}
audio_mixer_streams[i].state = AUDIO_STREAM_STATE_NONE;
audio_mixer_streams[i].volume = 0.0f;
audio_mixer_streams[i].stop_cb = NULL;
audio_mixer_streams[i].handle = NULL;
audio_mixer_streams[i].voice = NULL;
if (destroy)
{
audio_mixer_sound_t *handle = audio_mixer_streams[i].handle;
if (handle)
audio_mixer_destroy(handle);
audio_mixer_streams[i].state = AUDIO_STREAM_STATE_NONE;
audio_mixer_streams[i].volume = 0.0f;
audio_mixer_streams[i].stop_cb = NULL;
audio_mixer_streams[i].handle = NULL;
audio_mixer_streams[i].voice = NULL;
}
}
static void audio_driver_mixer_deinit(void)
{
unsigned i;
audio_set_bool(AUDIO_ACTION_MIXER, false);
audio_mixer_active = false;
for (i = 0; i < AUDIO_MIXER_MAX_STREAMS; i++)
{
audio_driver_mixer_stop_stream(i);
audio_driver_mixer_remove_stream(i);
}
audio_mixer_current_max_idx = 0;
audio_mixer_done();
}

View File

@ -35,6 +35,8 @@ RETRO_BEGIN_DECLS
#define AUDIO_MAX_RATIO 16
#define AUDIO_MIXER_MAX_STREAMS 8
enum audio_action
{
AUDIO_ACTION_NONE = 0,
@ -46,6 +48,25 @@ enum audio_action
AUDIO_ACTION_MIXER
};
enum audio_mixer_state
{
AUDIO_STREAM_STATE_NONE = 0,
AUDIO_STREAM_STATE_STOPPED,
AUDIO_STREAM_STATE_PLAYING,
AUDIO_STREAM_STATE_PLAYING_LOOPED
};
typedef struct audio_mixer_stream
{
audio_mixer_sound_t *handle;
audio_mixer_voice_t *voice;
audio_mixer_stop_cb_t stop_cb;
enum audio_mixer_state state;
float volume;
void *buf;
size_t bufsize;
} audio_mixer_stream_t;
typedef struct audio_statistics
{
float average_buffer_saturation;
@ -137,14 +158,6 @@ typedef struct audio_driver
size_t (*buffer_size)(void *data);
} audio_driver_t;
enum audio_mixer_state
{
AUDIO_STREAM_STATE_NONE = 0,
AUDIO_STREAM_STATE_STOPPED,
AUDIO_STREAM_STATE_PLAYING,
AUDIO_STREAM_STATE_PLAYING_LOOPED
};
typedef struct audio_mixer_stream_params
{
float volume;
@ -271,10 +284,24 @@ bool audio_driver_deinit(void);
bool audio_driver_init(void);
void audio_driver_menu_sample(void);
audio_mixer_stream_t *audio_driver_mixer_get_stream(unsigned i);
bool audio_driver_mixer_add_stream(audio_mixer_stream_params_t *params);
void audio_driver_mixer_play_stream(unsigned i);
void audio_driver_mixer_play_stream_looped(unsigned i);
void audio_driver_mixer_stop_stream(unsigned i);
void audio_driver_mixer_remove_stream(unsigned i);
enum resampler_quality audio_driver_get_resampler_quality(void);
enum audio_mixer_state audio_driver_mixer_get_stream_state(unsigned i);
bool compute_audio_buffer_statistics(audio_statistics_t *stats);
extern audio_driver_t audio_rsound;

View File

@ -1253,6 +1253,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
SETTING_BOOL("keyboard_gamepad_enable", &settings->bools.input_keyboard_gamepad_enable, true, true, false);
SETTING_BOOL("core_set_supports_no_game_enable", &settings->bools.set_supports_no_game_enable, true, true, false);
SETTING_BOOL("audio_enable", &settings->bools.audio_enable, true, audio_enable, false);
SETTING_BOOL("audio_enable_menu", &settings->bools.audio_enable_menu, true, false, false);
SETTING_BOOL("audio_mute_enable", audio_get_bool_ptr(AUDIO_ACTION_MUTE_ENABLE), true, false, false);
SETTING_BOOL("audio_mixer_mute_enable", audio_get_bool_ptr(AUDIO_ACTION_MIXER_MUTE_ENABLE), true, false, false);
SETTING_BOOL("location_allow", &settings->bools.location_allow, true, false, false);

View File

@ -99,6 +99,7 @@ typedef struct settings
/* Audio */
bool audio_enable;
bool audio_enable_menu;
bool audio_sync;
bool audio_rate_control;
bool audio_wasapi_exclusive_mode;

View File

@ -1,97 +0,0 @@
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;

View File

@ -66,8 +66,8 @@ calling RegisterWindowMessage(L("TaskbarButtonCreated")). That message must
be received by your application before it calls any ITaskbarList3 method.
*/
static unsigned orig_width = 0;
static unsigned orig_height = 0;
static unsigned win32_orig_width = 0;
static unsigned win32_orig_height = 0;
static void* win32_display_server_init(void)
{
@ -102,12 +102,12 @@ static void* win32_display_server_init(void)
static void win32_display_server_destroy(void *data)
{
if (orig_width > 0 && orig_height > 0 )
video_display_server_switch_resolution(orig_width, orig_height,
0, 60);
dispserv_win32_t *dispserv = (dispserv_win32_t*)data;
if (win32_orig_width > 0 && win32_orig_height > 0)
video_display_server_switch_resolution(win32_orig_width, win32_orig_height,
0, 60);
#ifdef HAS_TASKBAR_EXT
if (g_taskbarList && win32_taskbar_is_created())
{
@ -215,10 +215,10 @@ static bool win32_display_server_set_resolution(void *data,
if (!serv)
return false;
if (orig_width == 0)
orig_width = GetSystemMetrics(SM_CXSCREEN);
if (orig_height == 0)
orig_height = GetSystemMetrics(SM_CYSCREEN);
if (win32_orig_width == 0)
win32_orig_width = GetSystemMetrics(SM_CXSCREEN);
if (win32_orig_height == 0)
win32_orig_height = GetSystemMetrics(SM_CYSCREEN);
/* set hz float to an int for windows switching */
if (hz < 53)

View File

@ -3457,3 +3457,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_OVERLAYS,
"Show/hide the Overlay options.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_OVERLAYS,
"Show Overlay Settings")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_ENABLE_MENU,
"Enable menu audio")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_ENABLE_MENU,
"Enable or disable menu sound.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_SETTINGS,
"Mixer Settings")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_MIXER_SETTINGS,
"View and/or modify audio mixer settings.")

View File

@ -3243,3 +3243,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_OVERLAYS,
"Show/hide the Overlay options.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_OVERLAYS,
"Show Overlay Settings")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_ENABLE_MENU,
"Enable menu audio")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_ENABLE_MENU,
"Enable or disable menu sound.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_SETTINGS,
"Mixer Settings")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_MIXER_SETTINGS,
"View and/or modify audio mixer settings.")

View File

@ -3235,3 +3235,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_OVERLAYS,
"Show/hide the Overlay options.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_OVERLAYS,
"Show Overlay Settings")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_ENABLE_MENU,
"Enable menu audio")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_ENABLE_MENU,
"Enable or disable menu sound.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_SETTINGS,
"Mixer Settings")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_MIXER_SETTINGS,
"View and/or modify audio mixer settings.")

View File

@ -3349,3 +3349,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_OVERLAYS,
"Show/hide the Overlay options.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_OVERLAYS,
"Show Overlay Settings")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_ENABLE_MENU,
"Enable menu audio")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_ENABLE_MENU,
"Enable or disable menu sound.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_SETTINGS,
"Mixer Settings")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_MIXER_SETTINGS,
"View and/or modify audio mixer settings.")

View File

@ -3108,3 +3108,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_OVERLAYS,
"Show/hide the Overlay options.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_OVERLAYS,
"Show Overlay Settings")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_ENABLE_MENU,
"Enable menu audio")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_ENABLE_MENU,
"Enable or disable menu sound.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_SETTINGS,
"Mixer Settings")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_MIXER_SETTINGS,
"View and/or modify audio mixer settings.")

View File

@ -5839,3 +5839,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_OVERLAYS,
"Show/hide the Overlay options.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_OVERLAYS,
"Show Overlay Settings")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_ENABLE_MENU,
"Enable menu audio")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_ENABLE_MENU,
"Enable or disable menu sound.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_SETTINGS,
"Mixer Settings")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_MIXER_SETTINGS,
"View and/or modify audio mixer settings.")

View File

@ -3273,3 +3273,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_OVERLAYS,
"Show/hide the Overlay options.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_OVERLAYS,
"Show Overlay Settings")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_ENABLE_MENU,
"Enable menu audio")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_ENABLE_MENU,
"Enable or disable menu sound.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_SETTINGS,
"Mixer Settings")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_MIXER_SETTINGS,
"View and/or modify audio mixer settings.")

View File

@ -3310,24 +3310,32 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW,
MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW,
"Mostra statistiche tecniche su schermo.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_RGUI_BORDER_FILLER_ENABLE,
"Enable border filler")
"Abilita riempimento dei bordi")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_RGUI_BORDER_FILLER_THICKNESS_ENABLE,
"Enable border filler thickness")
"Attiva lo spessore del riempimento del bordo")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_RGUI_BACKGROUND_FILLER_THICKNESS_ENABLE,
"Enable background filler thickness")
MSG_HASH(MENU_ENUM_SUBLABEL_CRT_SWITCH_RESOLUTION, "For 15 kHz CRT displays only. Attempts to use exact core/game resolution and refresh rate.")
"Abilita lo spessore del riempimento dello sfondo")
MSG_HASH(MENU_ENUM_SUBLABEL_CRT_SWITCH_RESOLUTION, "Solo per schermi CRT a 15 kHz. Tenta di utilizzare la risoluzione esatta core/gioco e la frequenza di aggiornamento.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_CRT_SWITCH_RESOLUTION, "CRT SwitchRes")
MSG_HASH(MENU_ENUM_SUBLABEL_CRT_SWITCH_RESOLUTION_SUPER, "When CRT SwitchRes is enabled, force ultrawide horizontal resolution to minimize mode switching.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_CRT_SWITCH_RESOLUTION_SUPER, "CRT Super Resolution")
MSG_HASH(MENU_ENUM_SUBLABEL_CRT_SWITCH_RESOLUTION_SUPER, "Quando CRT SwitchRes è abilitato, forza la risoluzione orizzontale ultrawide per minimizzare il cambio di modalità.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_CRT_SWITCH_RESOLUTION_SUPER, "CRT Super Risoluzione")
MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_REWIND,
"Show Rewind Settings")
"Mostra impostazioni di riavvolgimento")
MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_REWIND,
"Show/hide the Rewind options.")
"Mostra/nascondi le opzioni di riavvolgimento.")
MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_LATENCY,
"Show/hide the Latency options.")
"Mostra/nascondi le opzioni di latenza.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_LATENCY,
"Show Latency Settings")
"Mostra le impostazioni di latenza")
MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_OVERLAYS,
"Show/hide the Overlay options.")
"Mostra/nascondi le opzioni di Sovrapposizione.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_OVERLAYS,
"Show Overlay Settings")
"Mostra le impostazioni di sovrapposizione")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_ENABLE_MENU,
"Abilita l'audio del menu")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_ENABLE_MENU,
"Abilita o disabilita il suono del menu.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_SETTINGS,
"Mixer Settings")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_MIXER_SETTINGS,
"View and/or modify audio mixer settings.")

View File

@ -3347,3 +3347,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_OVERLAYS,
"Show/hide the Overlay options.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_OVERLAYS,
"Show Overlay Settings")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_ENABLE_MENU,
"Enable menu audio")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_ENABLE_MENU,
"Enable or disable menu sound.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_SETTINGS,
"Mixer Settings")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_MIXER_SETTINGS,
"View and/or modify audio mixer settings.")

View File

@ -3234,3 +3234,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_OVERLAYS,
"Show/hide the Overlay options.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_OVERLAYS,
"Show Overlay Settings")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_ENABLE_MENU,
"Enable menu audio")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_ENABLE_MENU,
"Enable or disable menu sound.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_SETTINGS,
"Mixer Settings")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_MIXER_SETTINGS,
"View and/or modify audio mixer settings.")

View File

@ -271,6 +271,8 @@ MSG_HASH(MENU_ENUM_LABEL_DEFERRED_ARCHIVE_OPEN_DETECT_CORE,
"deferred_archive_open_detect_core")
MSG_HASH(MENU_ENUM_LABEL_DEFERRED_AUDIO_SETTINGS_LIST,
"deferred_audio_settings_list")
MSG_HASH(MENU_ENUM_LABEL_DEFERRED_AUDIO_MIXER_SETTINGS_LIST,
"deferred_audio_mixer_settings_list")
MSG_HASH(MENU_ENUM_LABEL_DEFERRED_CONFIGURATION_SETTINGS_LIST,
"deferred_configuration_settings_list")
MSG_HASH(MENU_ENUM_LABEL_DEFERRED_CORE_CONTENT_DIRS_LIST,
@ -1485,3 +1487,9 @@ MSG_HASH(MENU_ENUM_LABEL_CONTENT_SHOW_LATENCY,
"menu_show_latency_settings")
MSG_HASH(MENU_ENUM_LABEL_CONTENT_SHOW_OVERLAYS,
"menu_show_overlay_settings")
MSG_HASH(MENU_ENUM_LABEL_AUDIO_ENABLE_MENU,
"audio_enable_menu")
MSG_HASH(MENU_ENUM_LABEL_AUDIO_MIXER_SETTINGS,
"audio_mixer_settings")
MSG_HASH(MENU_ENUM_LABEL_DEFERRED_MIXER_STREAM_SETTINGS_LIST,
"deferred_mixer_stream_settings_list")

View File

@ -3110,3 +3110,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_OVERLAYS,
"Show/hide the Overlay options.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_OVERLAYS,
"Show Overlay Settings")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_ENABLE_MENU,
"Enable menu audio")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_ENABLE_MENU,
"Enable or disable menu sound.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_SETTINGS,
"Mixer Settings")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_MIXER_SETTINGS,
"View and/or modify audio mixer settings.")

View File

@ -3469,3 +3469,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_OVERLAYS,
"Show/hide the Overlay options.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_OVERLAYS,
"Show Overlay Settings")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_ENABLE_MENU,
"Enable menu audio")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_ENABLE_MENU,
"Enable or disable menu sound.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_SETTINGS,
"Mixer Settings")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_MIXER_SETTINGS,
"View and/or modify audio mixer settings.")

View File

@ -4338,3 +4338,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_OVERLAYS,
"Show/hide the Overlay options.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_OVERLAYS,
"Show Overlay Settings")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_ENABLE_MENU,
"Enable menu audio")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_ENABLE_MENU,
"Enable or disable menu sound.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_SETTINGS,
"Mixer Settings")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_MIXER_SETTINGS,
"View and/or modify audio mixer settings.")

View File

@ -3208,3 +3208,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_OVERLAYS,
"Show/hide the Overlay options.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_OVERLAYS,
"Show Overlay Settings")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_ENABLE_MENU,
"Enable menu audio")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_ENABLE_MENU,
"Enable or disable menu sound.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_SETTINGS,
"Mixer Settings")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_MIXER_SETTINGS,
"View and/or modify audio mixer settings.")

View File

@ -3292,3 +3292,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_OVERLAYS,
"Show/hide the Overlay options.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_OVERLAYS,
"Show Overlay Settings")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_ENABLE_MENU,
"Enable menu audio")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_ENABLE_MENU,
"Enable or disable menu sound.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_SETTINGS,
"Mixer Settings")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_MIXER_SETTINGS,
"View and/or modify audio mixer settings.")

View File

@ -3506,3 +3506,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_OVERLAYS,
"Show/hide the Overlay options.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_OVERLAYS,
"Show Overlay Settings")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_ENABLE_MENU,
"Enable menu audio")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_ENABLE_MENU,
"Enable or disable menu sound.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_SETTINGS,
"Mixer Settings")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_MIXER_SETTINGS,
"View and/or modify audio mixer settings.")

View File

@ -3265,3 +3265,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_OVERLAYS,
"Show/hide the Overlay options.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_OVERLAYS,
"Show Overlay Settings")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_ENABLE_MENU,
"Enable menu audio")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_ENABLE_MENU,
"Enable or disable menu sound.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_SETTINGS,
"Mixer Settings")
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_MIXER_SETTINGS,
"View and/or modify audio mixer settings.")

View File

@ -134,6 +134,7 @@ generic_deferred_push(deferred_push_core_settings_list, DISPLAYLIST_
generic_deferred_push(deferred_push_video_settings_list, DISPLAYLIST_VIDEO_SETTINGS_LIST)
generic_deferred_push(deferred_push_configuration_settings_list, DISPLAYLIST_CONFIGURATION_SETTINGS_LIST)
generic_deferred_push(deferred_push_saving_settings_list, DISPLAYLIST_SAVING_SETTINGS_LIST)
generic_deferred_push(deferred_push_mixer_stream_settings_list, DISPLAYLIST_MIXER_STREAM_SETTINGS_LIST)
generic_deferred_push(deferred_push_logging_settings_list, DISPLAYLIST_LOGGING_SETTINGS_LIST)
generic_deferred_push(deferred_push_frame_throttle_settings_list, DISPLAYLIST_FRAME_THROTTLE_SETTINGS_LIST)
generic_deferred_push(deferred_push_rewind_settings_list, DISPLAYLIST_REWIND_SETTINGS_LIST)
@ -154,6 +155,7 @@ generic_deferred_push(deferred_push_user_settings_list, DISPLAYLIST_
generic_deferred_push(deferred_push_directory_settings_list, DISPLAYLIST_DIRECTORY_SETTINGS_LIST)
generic_deferred_push(deferred_push_privacy_settings_list, DISPLAYLIST_PRIVACY_SETTINGS_LIST)
generic_deferred_push(deferred_push_audio_settings_list, DISPLAYLIST_AUDIO_SETTINGS_LIST)
generic_deferred_push(deferred_push_audio_mixer_settings_list, DISPLAYLIST_AUDIO_MIXER_SETTINGS_LIST)
generic_deferred_push(deferred_push_input_settings_list, DISPLAYLIST_INPUT_SETTINGS_LIST)
generic_deferred_push(deferred_push_latency_settings_list, DISPLAYLIST_LATENCY_SETTINGS_LIST)
generic_deferred_push(deferred_push_recording_settings_list, DISPLAYLIST_RECORDING_SETTINGS_LIST)
@ -624,6 +626,11 @@ static int menu_cbs_init_bind_deferred_push_compare_label(
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_saving_settings_list);
return 0;
}
else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_MIXER_STREAM_SETTINGS_LIST)))
{
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_mixer_stream_settings_list);
return 0;
}
else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_LOGGING_SETTINGS_LIST)))
{
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_logging_settings_list);
@ -809,6 +816,11 @@ static int menu_cbs_init_bind_deferred_push_compare_label(
{
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_audio_settings_list);
}
else if (strstr(label,
msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_AUDIO_MIXER_SETTINGS_LIST)))
{
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_audio_mixer_settings_list);
}
else if (strstr(label,
msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_LATENCY_SETTINGS_LIST)))
{

View File

@ -45,6 +45,7 @@
#include "../menu_content.h"
#include "../menu_shader.h"
#include "../../audio/audio_driver.h"
#include "../../core.h"
#include "../../configuration.h"
#include "../../core_info.h"
@ -247,6 +248,8 @@ static enum msg_hash_enums action_ok_dl_to_enum(unsigned lbl)
{
switch (lbl)
{
case ACTION_OK_DL_MIXER_STREAM_SETTINGS_LIST:
return MENU_ENUM_LABEL_DEFERRED_MIXER_STREAM_SETTINGS_LIST;
case ACTION_OK_DL_ACCOUNTS_LIST:
return MENU_ENUM_LABEL_DEFERRED_ACCOUNTS_LIST;
case ACTION_OK_DL_INPUT_SETTINGS_LIST:
@ -307,6 +310,8 @@ static enum msg_hash_enums action_ok_dl_to_enum(unsigned lbl)
return MENU_ENUM_LABEL_DEFERRED_PRIVACY_SETTINGS_LIST;
case ACTION_OK_DL_AUDIO_SETTINGS_LIST:
return MENU_ENUM_LABEL_DEFERRED_AUDIO_SETTINGS_LIST;
case ACTION_OK_DL_AUDIO_MIXER_SETTINGS_LIST:
return MENU_ENUM_LABEL_DEFERRED_AUDIO_MIXER_SETTINGS_LIST;
case ACTION_OK_DL_INPUT_HOTKEY_BINDS_LIST:
return MENU_ENUM_LABEL_DEFERRED_INPUT_HOTKEY_BINDS_LIST;
case ACTION_OK_DL_RECORDING_SETTINGS_LIST:
@ -789,7 +794,7 @@ int generic_action_ok_displaylist_push(const char *path,
break;
case ACTION_OK_DL_DEFERRED_CORE_LIST_SET:
info.directory_ptr = idx;
menu->rdb_entry_start_game_selection_ptr = (unsigned)idx;
menu->scratchpad.unsigned_var = (unsigned)idx;
info_path =
settings->paths.directory_libretro;
info_label = msg_hash_to_str(
@ -798,6 +803,7 @@ int generic_action_ok_displaylist_push(const char *path,
MENU_ENUM_LABEL_DEFERRED_CORE_LIST_SET;
dl_type = DISPLAYLIST_GENERIC;
break;
case ACTION_OK_DL_MIXER_STREAM_SETTINGS_LIST:
case ACTION_OK_DL_ACCOUNTS_LIST:
case ACTION_OK_DL_INPUT_SETTINGS_LIST:
case ACTION_OK_DL_LATENCY_SETTINGS_LIST:
@ -828,6 +834,7 @@ int generic_action_ok_displaylist_push(const char *path,
case ACTION_OK_DL_DIRECTORY_SETTINGS_LIST:
case ACTION_OK_DL_PRIVACY_SETTINGS_LIST:
case ACTION_OK_DL_AUDIO_SETTINGS_LIST:
case ACTION_OK_DL_AUDIO_MIXER_SETTINGS_LIST:
case ACTION_OK_DL_INPUT_HOTKEY_BINDS_LIST:
case ACTION_OK_DL_RECORDING_SETTINGS_LIST:
case ACTION_OK_DL_PLAYLIST_SETTINGS_LIST:
@ -851,6 +858,20 @@ int generic_action_ok_displaylist_push(const char *path,
break;
}
/* second pass */
switch (action_type)
{
case ACTION_OK_DL_MIXER_STREAM_SETTINGS_LIST:
{
unsigned player_no = type - MENU_SETTINGS_AUDIO_MIXER_STREAM_BEGIN;
info.type = MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_BEGIN + player_no;
}
break;
default:
break;
}
if (info_label)
info.label = strdup(info_label);
if (info_path)
@ -1277,7 +1298,7 @@ static int generic_action_ok(const char *path,
case ACTION_OK_LOAD_SHADER_PASS:
{
struct video_shader *shader = menu_shader_get();
struct video_shader_pass *shader_pass = shader ? &shader->pass[(unsigned)menu->hack_shader_pass] : NULL;
struct video_shader_pass *shader_pass = shader ? &shader->pass[menu->scratchpad.unsigned_var] : NULL;
flush_char = msg_hash_to_str((enum msg_hash_enums)flush_id);
if (shader_pass)
@ -1685,7 +1706,7 @@ static int action_ok_playlist_entry_start_content(const char *path,
!menu_driver_ctl(RARCH_MENU_CTL_DRIVER_DATA_GET, &menu))
return menu_cbs_exit();
selection_ptr = menu->rdb_entry_start_game_selection_ptr;
selection_ptr = menu->scratchpad.unsigned_var;
playlist_get_index(playlist, selection_ptr,
&entry_path, &entry_label, &core_path, &core_name, NULL, NULL);
@ -1746,6 +1767,82 @@ error:
return menu_cbs_exit();
}
static int action_ok_mixer_stream_action_play(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
unsigned stream_id = type - MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_PLAY_BEGIN;
enum audio_mixer_state state = audio_driver_mixer_get_stream_state(stream_id);
switch (state)
{
case AUDIO_STREAM_STATE_STOPPED:
audio_driver_mixer_play_stream(stream_id);
break;
case AUDIO_STREAM_STATE_PLAYING:
case AUDIO_STREAM_STATE_PLAYING_LOOPED:
case AUDIO_STREAM_STATE_NONE:
break;
}
return 0;
}
static int action_ok_mixer_stream_action_play_looped(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
unsigned stream_id = type - MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_PLAY_LOOPED_BEGIN;
enum audio_mixer_state state = audio_driver_mixer_get_stream_state(stream_id);
switch (state)
{
case AUDIO_STREAM_STATE_STOPPED:
audio_driver_mixer_play_stream_looped(stream_id);
break;
case AUDIO_STREAM_STATE_PLAYING:
case AUDIO_STREAM_STATE_PLAYING_LOOPED:
case AUDIO_STREAM_STATE_NONE:
break;
}
return 0;
}
static int action_ok_mixer_stream_action_remove(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
unsigned stream_id = type - MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_REMOVE_BEGIN;
enum audio_mixer_state state = audio_driver_mixer_get_stream_state(stream_id);
switch (state)
{
case AUDIO_STREAM_STATE_PLAYING:
case AUDIO_STREAM_STATE_PLAYING_LOOPED:
case AUDIO_STREAM_STATE_STOPPED:
audio_driver_mixer_remove_stream(stream_id);
break;
case AUDIO_STREAM_STATE_NONE:
break;
}
return 0;
}
static int action_ok_mixer_stream_action_stop(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
unsigned stream_id = type - MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_STOP_BEGIN;
enum audio_mixer_state state = audio_driver_mixer_get_stream_state(stream_id);
switch (state)
{
case AUDIO_STREAM_STATE_PLAYING:
case AUDIO_STREAM_STATE_PLAYING_LOOPED:
audio_driver_mixer_stop_stream(stream_id);
break;
case AUDIO_STREAM_STATE_STOPPED:
case AUDIO_STREAM_STATE_NONE:
break;
}
return 0;
}
static int action_ok_lookup_setting(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
@ -2293,7 +2390,7 @@ static int action_ok_core_deferred_set(const char *new_core_path,
settings->bools.show_hidden_files);
command_playlist_update_write(
NULL,
menu->rdb_entry_start_game_selection_ptr,
menu->scratchpad.unsigned_var,
NULL,
content_label,
new_core_path,
@ -3200,6 +3297,7 @@ default_action_ok_func(action_ok_netplay_sublist, ACTION_OK_DL_NETPLAY)
default_action_ok_func(action_ok_directory_list, ACTION_OK_DL_DIRECTORY_SETTINGS_LIST)
default_action_ok_func(action_ok_privacy_list, ACTION_OK_DL_PRIVACY_SETTINGS_LIST)
default_action_ok_func(action_ok_rdb_entry, ACTION_OK_DL_RDB_ENTRY)
default_action_ok_func(action_ok_mixer_stream_actions, ACTION_OK_DL_MIXER_STREAM_SETTINGS_LIST)
default_action_ok_func(action_ok_browse_url_list, ACTION_OK_DL_BROWSE_URL_LIST)
default_action_ok_func(action_ok_core_list, ACTION_OK_DL_CORE_LIST)
default_action_ok_func(action_ok_cheat_file, ACTION_OK_DL_CHEAT_FILE)
@ -3221,6 +3319,7 @@ default_action_ok_func(action_ok_push_video_settings_list, ACTION_OK_DL_VIDEO_SE
default_action_ok_func(action_ok_push_configuration_settings_list, ACTION_OK_DL_CONFIGURATION_SETTINGS_LIST)
default_action_ok_func(action_ok_push_core_settings_list, ACTION_OK_DL_CORE_SETTINGS_LIST)
default_action_ok_func(action_ok_push_audio_settings_list, ACTION_OK_DL_AUDIO_SETTINGS_LIST)
default_action_ok_func(action_ok_push_audio_mixer_settings_list, ACTION_OK_DL_AUDIO_MIXER_SETTINGS_LIST)
default_action_ok_func(action_ok_push_input_settings_list, ACTION_OK_DL_INPUT_SETTINGS_LIST)
default_action_ok_func(action_ok_push_latency_settings_list, ACTION_OK_DL_LATENCY_SETTINGS_LIST)
default_action_ok_func(action_ok_push_recording_settings_list, ACTION_OK_DL_RECORDING_SETTINGS_LIST)
@ -3238,7 +3337,7 @@ static int action_ok_shader_pass(const char *path,
if (!menu_driver_ctl(RARCH_MENU_CTL_DRIVER_DATA_GET, &menu))
return menu_cbs_exit();
menu->hack_shader_pass = type - MENU_SETTINGS_SHADER_PASS_0;
menu->scratchpad.unsigned_var = type - MENU_SETTINGS_SHADER_PASS_0;
return generic_action_ok_displaylist_push(path, NULL, label, type, idx,
entry_idx, ACTION_OK_DL_SHADER_PASS);
}
@ -4222,6 +4321,9 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_AUDIO_SETTINGS:
BIND_ACTION_OK(cbs, action_ok_push_audio_settings_list);
break;
case MENU_ENUM_LABEL_AUDIO_MIXER_SETTINGS:
BIND_ACTION_OK(cbs, action_ok_push_audio_mixer_settings_list);
break;
case MENU_ENUM_LABEL_LATENCY_SETTINGS:
BIND_ACTION_OK(cbs, action_ok_push_latency_settings_list);
break;
@ -4568,6 +4670,31 @@ static int menu_cbs_init_bind_ok_compare_type(menu_file_list_cbs_t *cbs,
{
BIND_ACTION_OK(cbs, action_ok_lookup_setting);
}
else if (type >= MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_PLAY_BEGIN
&& type <= MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_PLAY_END)
{
BIND_ACTION_OK(cbs, action_ok_mixer_stream_action_play);
}
else if (type >= MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_PLAY_LOOPED_BEGIN
&& type <= MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_PLAY_LOOPED_END)
{
BIND_ACTION_OK(cbs, action_ok_mixer_stream_action_play_looped);
}
else if (type >= MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_REMOVE_BEGIN
&& type <= MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_REMOVE_END)
{
BIND_ACTION_OK(cbs, action_ok_mixer_stream_action_remove);
}
else if (type >= MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_STOP_BEGIN
&& type <= MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_STOP_END)
{
BIND_ACTION_OK(cbs, action_ok_mixer_stream_action_stop);
}
else if (type >= MENU_SETTINGS_AUDIO_MIXER_STREAM_BEGIN
&& type <= MENU_SETTINGS_AUDIO_MIXER_STREAM_END)
{
BIND_ACTION_OK(cbs, action_ok_mixer_stream_actions);
}
else if (type >= MENU_SETTINGS_SHADER_PARAMETER_0
&& type <= MENU_SETTINGS_SHADER_PARAMETER_LAST)
{

View File

@ -144,9 +144,9 @@ static int action_start_shader_pass(unsigned type, const char *label)
if (!menu_driver_ctl(RARCH_MENU_CTL_DRIVER_DATA_GET, &menu))
return menu_cbs_exit();
menu->hack_shader_pass = type - MENU_SETTINGS_SHADER_PASS_0;
menu->scratchpad.unsigned_var = type - MENU_SETTINGS_SHADER_PASS_0;
menu_shader_manager_clear_pass_path((unsigned)menu->hack_shader_pass);
menu_shader_manager_clear_pass_path(menu->scratchpad.unsigned_var);
return 0;
}

View File

@ -15,6 +15,7 @@
#include <compat/strl.h>
#include "../../audio/audio_driver.h"
#include "../menu_driver.h"
#include "../menu_cbs.h"
@ -137,6 +138,7 @@ default_sublabel_macro(action_bind_sublabel_dummy_check_missing_firmware, MENU_
default_sublabel_macro(action_bind_sublabel_video_refresh_rate, MENU_ENUM_SUBLABEL_VIDEO_REFRESH_RATE)
default_sublabel_macro(action_bind_sublabel_video_refresh_rate_polled, MENU_ENUM_SUBLABEL_VIDEO_REFRESH_RATE_POLLED)
default_sublabel_macro(action_bind_sublabel_audio_enable, MENU_ENUM_SUBLABEL_AUDIO_ENABLE)
default_sublabel_macro(action_bind_sublabel_audio_enable_menu, MENU_ENUM_SUBLABEL_AUDIO_ENABLE_MENU)
default_sublabel_macro(action_bind_sublabel_audio_max_timing_skew, MENU_ENUM_SUBLABEL_AUDIO_MAX_TIMING_SKEW)
default_sublabel_macro(action_bind_sublabel_pause_nonactive, MENU_ENUM_SUBLABEL_PAUSE_NONACTIVE)
default_sublabel_macro(action_bind_sublabel_video_disable_composition, MENU_ENUM_SUBLABEL_VIDEO_DISABLE_COMPOSITION)
@ -459,6 +461,40 @@ static int action_bind_sublabel_remap_kbd_sublabel(
return 0;
}
static int action_bind_sublabel_audio_mixer_stream(
file_list_t *list,
unsigned type, unsigned i,
const char *label, const char *path,
char *s, size_t len)
{
char msg[64];
unsigned offset = (type - MENU_SETTINGS_AUDIO_MIXER_STREAM_BEGIN);
settings_t *settings = config_get_ptr();
audio_mixer_stream_t *stream = audio_driver_mixer_get_stream(offset);
if (!stream)
return 0;
switch (stream->state)
{
case AUDIO_STREAM_STATE_NONE:
strlcpy(msg, "N/A", sizeof(msg));
break;
case AUDIO_STREAM_STATE_STOPPED:
strlcpy(msg, "Stopped", sizeof(msg));
break;
case AUDIO_STREAM_STATE_PLAYING:
strlcpy(msg, "Playing", sizeof(msg));
break;
case AUDIO_STREAM_STATE_PLAYING_LOOPED:
strlcpy(msg, "Playing (Looped)", sizeof(msg));
break;
}
snprintf(s, len, "State : %s | Volume: %.2f dB", msg,
stream->volume);
return 0;
}
static int action_bind_sublabel_remap_sublabel(
file_list_t *list,
@ -552,6 +588,13 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_remap_sublabel);
}
if (type >= MENU_SETTINGS_AUDIO_MIXER_STREAM_BEGIN
&& type <= MENU_SETTINGS_AUDIO_MIXER_STREAM_END)
{
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_audio_mixer_stream);
return 0;
}
if (cbs->enum_idx != MSG_UNKNOWN)
{
switch (cbs->enum_idx)
@ -1331,6 +1374,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_AUDIO_ENABLE:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_audio_enable);
break;
case MENU_ENUM_LABEL_AUDIO_ENABLE_MENU:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_audio_enable_menu);
break;
case MENU_ENUM_LABEL_VIDEO_REFRESH_RATE:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_video_refresh_rate);
break;

View File

@ -124,6 +124,7 @@ default_title_macro(action_get_directory_settings_list, MENU_ENUM_LABEL_
default_title_macro(action_get_privacy_settings_list, MENU_ENUM_LABEL_VALUE_PRIVACY_SETTINGS)
default_title_macro(action_get_updater_settings_list, MENU_ENUM_LABEL_VALUE_UPDATER_SETTINGS)
default_title_macro(action_get_audio_settings_list, MENU_ENUM_LABEL_VALUE_AUDIO_SETTINGS)
default_title_macro(action_get_audio_mixer_settings_list, MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_SETTINGS)
default_title_macro(action_get_input_settings_list, MENU_ENUM_LABEL_VALUE_INPUT_SETTINGS)
default_title_macro(action_get_latency_settings_list, MENU_ENUM_LABEL_VALUE_LATENCY_SETTINGS)
default_title_macro(action_get_core_cheat_options_list, MENU_ENUM_LABEL_VALUE_CORE_CHEAT_OPTIONS)
@ -476,6 +477,11 @@ static int menu_cbs_init_bind_title_compare_label(menu_file_list_cbs_t *cbs,
BIND_ACTION_GET_TITLE(cbs, action_get_audio_settings_list);
return 0;
}
else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_AUDIO_MIXER_SETTINGS_LIST)))
{
BIND_ACTION_GET_TITLE(cbs, action_get_audio_mixer_settings_list);
return 0;
}
else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_LATENCY_SETTINGS_LIST)))
{
BIND_ACTION_GET_TITLE(cbs, action_get_latency_settings_list);

View File

@ -68,6 +68,7 @@ enum
ACTION_OK_DL_DRIVER_SETTINGS_LIST,
ACTION_OK_DL_VIDEO_SETTINGS_LIST,
ACTION_OK_DL_AUDIO_SETTINGS_LIST,
ACTION_OK_DL_AUDIO_MIXER_SETTINGS_LIST,
ACTION_OK_DL_LATENCY_SETTINGS_LIST,
ACTION_OK_DL_CONFIGURATION_SETTINGS_LIST,
ACTION_OK_DL_SAVING_SETTINGS_LIST,
@ -107,6 +108,7 @@ enum
ACTION_OK_DL_CORE_CONTENT_DIRS_SUBDIR_LIST,
ACTION_OK_DL_DEFERRED_CORE_LIST,
ACTION_OK_DL_DEFERRED_CORE_LIST_SET,
ACTION_OK_DL_MIXER_STREAM_SETTINGS_LIST,
ACTION_OK_DL_ONSCREEN_DISPLAY_SETTINGS_LIST,
ACTION_OK_DL_ONSCREEN_OVERLAY_SETTINGS_LIST,
ACTION_OK_DL_ONSCREEN_NOTIFICATIONS_SETTINGS_LIST,

View File

@ -1585,7 +1585,8 @@ static enum msg_file_type extension_to_file_hash_type(const char *ext)
return FILE_TYPE_NONE;
}
static int menu_displaylist_parse_database_entry(menu_displaylist_info_t *info)
static int menu_displaylist_parse_database_entry(
menu_displaylist_info_t *info)
{
unsigned i, j, k;
char path_playlist[PATH_MAX_LENGTH];
@ -1698,7 +1699,7 @@ static int menu_displaylist_parse_database_entry(menu_displaylist_info_t *info)
if (!match_found)
continue;
menu->rdb_entry_start_game_selection_ptr = j;
menu->scratchpad.unsigned_var = j;
}
}
@ -4252,6 +4253,53 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
FILE_TYPE_PLAYLIST_ENTRY, 0, 0);
#endif
}
info->need_push = true;
info->need_refresh = true;
info->need_clear = true;
break;
case DISPLAYLIST_MIXER_STREAM_SETTINGS_LIST:
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
{
char lbl_play[128];
char lbl_play_looped[128];
char lbl_remove[128];
char lbl_stop[128];
unsigned id = info->type - MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_BEGIN;
lbl_remove[0] = lbl_stop[0] = lbl_play[0] = lbl_play_looped[0] = '\0';
snprintf(lbl_stop, sizeof(lbl_stop), "mixer_stream_%d_action_stop", id);
snprintf(lbl_remove, sizeof(lbl_remove), "mixer_stream_%d_action_remove", id);
snprintf(lbl_play, sizeof(lbl_play), "mixer_stream_%d_action_play", id);
snprintf(lbl_play_looped, sizeof(lbl_play_looped), "mixer_stream_%d_action_play_looped", id);
menu_entries_append_enum(info->list,
"Play",
lbl_play,
MSG_UNKNOWN,
(MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_PLAY_BEGIN + id),
0, 0);
menu_entries_append_enum(info->list,
"Play (Looped)",
lbl_play_looped,
MSG_UNKNOWN,
(MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_PLAY_LOOPED_BEGIN + id),
0, 0);
menu_entries_append_enum(info->list,
"Stop",
lbl_stop,
MSG_UNKNOWN,
(MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_STOP_BEGIN + id),
0, 0);
menu_entries_append_enum(info->list,
"Remove",
lbl_remove,
MSG_UNKNOWN,
(MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_REMOVE_BEGIN + id),
0, 0);
}
info->need_push = true;
info->need_refresh = true;
info->need_clear = true;
@ -6054,11 +6102,36 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
info->need_refresh = true;
info->need_push = true;
break;
case DISPLAYLIST_AUDIO_MIXER_SETTINGS_LIST:
{
unsigned i;
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
for (i = 0; i < AUDIO_MIXER_MAX_STREAMS; i++)
{
char msg[128];
char msg_lbl[128];
snprintf(msg, sizeof(msg), "Mixer Stream #%d :\n", i+1);
snprintf(msg_lbl, sizeof(msg_lbl), "audio_mixer_stream_%d\n", i);
menu_entries_append_enum(info->list, msg, msg_lbl,
MSG_UNKNOWN,
(MENU_SETTINGS_AUDIO_MIXER_STREAM_BEGIN + i),
0, 0);
count++;
}
info->need_refresh = true;
info->need_push = true;
}
break;
case DISPLAYLIST_AUDIO_SETTINGS_LIST:
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_AUDIO_ENABLE,
PARSE_ONLY_BOOL, false);
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_AUDIO_ENABLE_MENU,
PARSE_ONLY_BOOL, false);
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_AUDIO_MUTE,
PARSE_ONLY_BOOL, false);
@ -6241,6 +6314,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
MENU_ENUM_LABEL_VIDEO_SETTINGS, PARSE_ACTION, false);
ret = menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_AUDIO_SETTINGS, PARSE_ACTION, false);
ret = menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_AUDIO_MIXER_SETTINGS, PARSE_ACTION, false);
ret = menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_INPUT_SETTINGS, PARSE_ACTION, false);
ret = menu_displaylist_parse_settings_enum(menu, info,

View File

@ -110,6 +110,7 @@ enum menu_displaylist_ctl_state
DISPLAYLIST_ACHIEVEMENT_LIST,
DISPLAYLIST_USER_BINDS_LIST,
DISPLAYLIST_ACCOUNTS_LIST,
DISPLAYLIST_MIXER_STREAM_SETTINGS_LIST,
DISPLAYLIST_DRIVER_SETTINGS_LIST,
DISPLAYLIST_VIDEO_SETTINGS_LIST,
DISPLAYLIST_CONFIGURATION_SETTINGS_LIST,
@ -118,6 +119,7 @@ enum menu_displaylist_ctl_state
DISPLAYLIST_FRAME_THROTTLE_SETTINGS_LIST,
DISPLAYLIST_REWIND_SETTINGS_LIST,
DISPLAYLIST_AUDIO_SETTINGS_LIST,
DISPLAYLIST_AUDIO_MIXER_SETTINGS_LIST,
DISPLAYLIST_CORE_SETTINGS_LIST,
DISPLAYLIST_INPUT_SETTINGS_LIST,
DISPLAYLIST_LATENCY_SETTINGS_LIST,

View File

@ -25,6 +25,10 @@
#include <streams/file_stream.h>
#include <string/stdstring.h>
#ifdef WIIU
#include <wiiu/os/energy.h>
#endif
#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif
@ -423,7 +427,7 @@ void menu_display_set_font_framebuffer(const uint8_t *buffer)
menu_display_font_framebuf = buffer;
}
static bool menu_display_libretro_running(
bool menu_display_libretro_running(
bool rarch_is_inited,
bool rarch_is_dummy_core)
{
@ -1656,6 +1660,8 @@ static void menu_driver_toggle(bool on)
settings_t *settings = config_get_ptr();
bool pause_libretro = settings ?
settings->bools.menu_pause_libretro : false;
bool enable_menu_sound = settings ?
settings->bools.audio_enable_menu : false;
menu_driver_toggled = on;
@ -1676,6 +1682,12 @@ static void menu_driver_toggle(bool on)
if (menu_driver_alive)
{
bool refresh = false;
#ifdef WIIU
/* Enable burn-in protection menu is running */
IMEnableDim();
#endif
menu_entries_ctl(MENU_ENTRIES_CTL_SET_REFRESH, &refresh);
/* Menu should always run with vsync on. */
@ -1683,7 +1695,7 @@ static void menu_driver_toggle(bool on)
/* Stop all rumbling before entering the menu. */
command_event(CMD_EVENT_RUMBLE_STOP, NULL);
if (pause_libretro)
if (pause_libretro && !enable_menu_sound)
command_event(CMD_EVENT_AUDIO_STOP, NULL);
/* Override keyboard callback to redirect to menu instead.
@ -1699,10 +1711,17 @@ static void menu_driver_toggle(bool on)
}
else
{
#ifdef WIIU
/* Disable burn-in protection while core is running; this is needed
* because HID inputs don't count for the purpose of Wii U
* power-saving. */
IMDisableDim();
#endif
if (!rarch_ctl(RARCH_CTL_IS_SHUTDOWN, NULL))
driver_set_nonblock_state();
if (pause_libretro)
if (pause_libretro && !enable_menu_sound)
command_event(CMD_EVENT_AUDIO_START, NULL);
/* Restore libretro keyboard callback. */

View File

@ -188,6 +188,19 @@ enum menu_settings_type
MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_IMAGE_APPEND,
MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_CYCLE_TRAY_STATUS,
MENU_SETTINGS_AUDIO_MIXER_STREAM_BEGIN,
MENU_SETTINGS_AUDIO_MIXER_STREAM_END = MENU_SETTINGS_AUDIO_MIXER_STREAM_BEGIN + 7,
MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_BEGIN,
MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_END = MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_BEGIN + 7,
MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_STOP_BEGIN,
MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_STOP_END = MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_STOP_BEGIN + 7,
MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_REMOVE_BEGIN,
MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_REMOVE_END = MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_REMOVE_BEGIN + 7,
MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_PLAY_BEGIN,
MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_PLAY_END = MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_PLAY_BEGIN + 7,
MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_PLAY_LOOPED_BEGIN,
MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_PLAY_LOOPED_END = MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_PLAY_LOOPED_BEGIN + 7,
MENU_SETTINGS_BIND_BEGIN,
MENU_SETTINGS_BIND_LAST = MENU_SETTINGS_BIND_BEGIN + RARCH_ANALOG_RIGHT_Y_MINUS,
MENU_SETTINGS_BIND_ALL_LAST = MENU_SETTINGS_BIND_BEGIN + RARCH_MENU_TOGGLE,
@ -354,9 +367,7 @@ typedef struct menu_display_ctx_driver
typedef struct
{
unsigned rpl_entry_selection_ptr;
unsigned rdb_entry_start_game_selection_ptr;
size_t core_len;
size_t hack_shader_pass;
uint64_t state;
char *core_buf;
@ -371,6 +382,15 @@ typedef struct
char db_playlist_file[PATH_MAX_LENGTH];
char filebrowser_label[PATH_MAX_LENGTH];
char detect_content_path[PATH_MAX_LENGTH];
/* This is used for storing intermediary variables
* that get used later on during menu actions -
* for instance, selecting a shader pass for a shader
* slot */
struct
{
unsigned unsigned_var;
} scratchpad;
} menu_handle_t;
typedef struct menu_display_ctx_draw
@ -648,6 +668,8 @@ video_coord_array_t *menu_display_get_coords_array(void);
const uint8_t *menu_display_get_font_framebuffer(void);
void menu_display_set_font_framebuffer(const uint8_t *buffer);
bool menu_display_libretro(bool is_idle, bool is_inited, bool is_dummy);
bool menu_display_libretro_running(bool rarch_is_inited,
bool rarch_is_dummy_core);
void menu_display_set_width(unsigned width);
void menu_display_get_fb_size(unsigned *fb_width, unsigned *fb_height,

View File

@ -2243,6 +2243,14 @@ static bool setting_append_list(
&subgroup_info,
parent_group);
CONFIG_ACTION(
list, list_info,
MENU_ENUM_LABEL_AUDIO_MIXER_SETTINGS,
MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_SETTINGS,
&group_info,
&subgroup_info,
parent_group);
CONFIG_ACTION(
list, list_info,
MENU_ENUM_LABEL_INPUT_SETTINGS,
@ -3801,7 +3809,23 @@ static bool setting_append_list(
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_ADVANCED
SD_FLAG_NONE
);
CONFIG_BOOL(
list, list_info,
&settings->bools.audio_enable_menu,
MENU_ENUM_LABEL_AUDIO_ENABLE_MENU,
MENU_ENUM_LABEL_VALUE_AUDIO_ENABLE_MENU,
false,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE
);
CONFIG_BOOL(

View File

@ -136,6 +136,7 @@ enum msg_file_type
FILE_TYPE_ISO,
FILE_TYPE_LUTRO,
FILE_TYPE_CHD,
FILE_TYPE_WBFS,
FILE_TYPE_DIRECT_LOAD,
@ -665,7 +666,7 @@ enum msg_hash_enums
MENU_LABEL(INPUT_UNIFIED_MENU_CONTROLS),
/* Video */
MENU_LABEL(CRT_SWITCH_RESOLUTION),
MENU_LABEL(CRT_SWITCH_RESOLUTION),
MENU_LABEL(CRT_SWITCH_RESOLUTION_SUPER),
MENU_LABEL(VIDEO_FONT_ENABLE),
MENU_LABEL(VIDEO_FONT_PATH),
@ -937,6 +938,7 @@ enum msg_hash_enums
MENU_LABEL(BROWSE_URL),
MENU_LABEL(BROWSE_START),
/* Deferred */
MENU_ENUM_LABEL_DEFERRED_MIXER_STREAM_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_CONFIGURATIONS_LIST,
MENU_ENUM_LABEL_DEFERRED_FAVORITES_LIST,
MENU_ENUM_LABEL_DEFERRED_PLAYLIST_LIST,
@ -1010,6 +1012,7 @@ enum msg_hash_enums
MENU_ENUM_LABEL_DEFERRED_PRIVACY_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_LOGGING_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_AUDIO_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_AUDIO_MIXER_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_CORE_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_USER_BINDS_LIST,
MENU_ENUM_LABEL_DEFERRED_ACCOUNTS_CHEEVOS_LIST,
@ -1111,6 +1114,7 @@ enum msg_hash_enums
/* Audio */
MENU_LABEL(AUDIO_ENABLE),
MENU_LABEL(AUDIO_ENABLE_MENU),
MENU_LABEL(AUDIO_MAX_TIMING_SKEW),
MENU_LABEL(AUDIO_OUTPUT_RATE),
MENU_LABEL(AUDIO_DEVICE),
@ -1486,6 +1490,7 @@ enum msg_hash_enums
MENU_LABEL(DRIVER_SETTINGS),
MENU_LABEL(VIDEO_SETTINGS),
MENU_LABEL(AUDIO_SETTINGS),
MENU_LABEL(AUDIO_MIXER_SETTINGS),
MENU_LABEL(LATENCY_SETTINGS),
MENU_LABEL(CORE_SETTINGS),
MENU_LABEL(CONFIGURATION_SETTINGS),

View File

@ -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,19 @@ static enum runloop_state runloop_check_state(
rarch_menu_running_finished();
if (focused || !runloop_idle)
{
bool libretro_running = menu_display_libretro_running(
rarch_is_inited,
(current_core_type == CORE_TYPE_DUMMY));
menu_driver_render(runloop_idle, rarch_is_inited,
(current_core_type == CORE_TYPE_DUMMY)
)
;
if (settings->bools.audio_enable_menu &&
!libretro_running)
audio_driver_menu_sample();
}
old_input = current_input;

View File

@ -89,7 +89,7 @@ static void task_audio_mixer_handle_upload_ogg(void *task_data,
if (!img)
return;
params.volume = 1.0f;
params.volume = 0.0f;
params.type = AUDIO_MIXER_TYPE_OGG;
params.state = AUDIO_STREAM_STATE_PLAYING;
params.buf = img->buf;
@ -111,7 +111,7 @@ static void task_audio_mixer_handle_upload_flac(void *task_data,
if (!img)
return;
params.volume = 1.0f;
params.volume = 0.0f;
params.type = AUDIO_MIXER_TYPE_FLAC;
params.state = AUDIO_STREAM_STATE_PLAYING;
params.buf = img->buf;
@ -133,7 +133,7 @@ static void task_audio_mixer_handle_upload_mp3(void *task_data,
if (!img)
return;
params.volume = 1.0f;
params.volume = 0.0f;
params.type = AUDIO_MIXER_TYPE_MP3;
params.state = AUDIO_STREAM_STATE_PLAYING;
params.buf = img->buf;
@ -155,7 +155,7 @@ static void task_audio_mixer_handle_upload_mod(void *task_data,
if (!img)
return;
params.volume = 1.0f;
params.volume = 0.0f;
params.type = AUDIO_MIXER_TYPE_MOD;
params.state = AUDIO_STREAM_STATE_PLAYING;
params.buf = img->buf;
@ -177,7 +177,7 @@ static void task_audio_mixer_handle_upload_wav(void *task_data,
if (!img)
return;
params.volume = 1.0f;
params.volume = 0.0f;
params.type = AUDIO_MIXER_TYPE_WAV;
params.state = AUDIO_STREAM_STATE_PLAYING;
params.buf = img->buf;

View File

@ -595,6 +595,11 @@ static enum msg_file_type extension_to_file_type(const char *ext)
string_is_equal(ext, "CHD")
)
return FILE_TYPE_CHD;
if (
string_is_equal(ext, "wbfs") ||
string_is_equal(ext, "WBFS")
)
return FILE_TYPE_WBFS;
if (
string_is_equal(ext, "lutro") ||
string_is_equal(ext, "LUTRO")
@ -642,6 +647,8 @@ static int task_database_iterate_playlist(
return task_database_gdi_get_crc(name, &db_state->crc);
}
break;
/* Consider Wii WBFS files similar to ISO files. */
case FILE_TYPE_WBFS:
case FILE_TYPE_ISO:
db_state->serial[0] = '\0';
intfstream_file_get_serial(name, 0, SIZE_MAX, db_state->serial);
@ -1301,7 +1308,7 @@ bool task_push_dbscan(
const char *playlist_directory,
const char *content_database,
const char *fullpath,
bool directory,
bool directory,
bool show_hidden_files,
retro_task_callback_t cb)
{

View File

@ -333,6 +333,11 @@ int detect_serial_ascii_game(intfstream_t *fd, char *game_id)
game_id[15] = '\0';
numberOfAscii = 0;
/* When scanning WBFS files, "WBFS" is discovered as the first serial. Ignore it. */
if (string_is_equal(game_id, "WBFS")) {
continue;
}
/* Loop through until we run out of ASCII characters. */
for (i = 0; i < 15; i++)
{