mirror of
https://github.com/libretro/RetroArch
synced 2025-01-29 09:32:52 +00:00
Add WASAPI audio driver settings to the menu
This commit is contained in:
parent
9fdcd926ad
commit
3e58159480
@ -50,6 +50,12 @@ MSG_HASH(MENU_ENUM_LABEL_AUDIO_SYNC,
|
||||
"audio_sync")
|
||||
MSG_HASH(MENU_ENUM_LABEL_AUDIO_VOLUME,
|
||||
"audio_volume")
|
||||
MSG_HASH(MENU_ENUM_LABEL_AUDIO_WASAPI_EXCLUSIVE_MODE,
|
||||
"audio_wasapi_exclusive_mode")
|
||||
MSG_HASH(MENU_ENUM_LABEL_AUDIO_WASAPI_FLOAT_FORMAT,
|
||||
"audio_wasapi_float_format")
|
||||
MSG_HASH(MENU_ENUM_LABEL_AUDIO_WASAPI_SH_BUFFER_LENGTH,
|
||||
"audio_wasapi_sh_buffer_length")
|
||||
MSG_HASH(MENU_ENUM_LABEL_AUTOSAVE_INTERVAL,
|
||||
"autosave_interval")
|
||||
MSG_HASH(MENU_ENUM_LABEL_AUTO_OVERRIDES_ENABLE,
|
||||
|
@ -274,6 +274,18 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_AUDIO_VOLUME,
|
||||
"Audio Volume Level (dB)"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_AUDIO_WASAPI_EXCLUSIVE_MODE,
|
||||
"WASAPI Exclusive Mode"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_AUDIO_WASAPI_FLOAT_FORMAT,
|
||||
"WASAPI Float Format"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_AUDIO_WASAPI_SH_BUFFER_LENGTH,
|
||||
"WASAPI Buffer Length"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_AUTOSAVE_INTERVAL,
|
||||
"SaveRAM Autosave Interval"
|
||||
@ -2235,6 +2247,18 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_AUDIO_VOLUME,
|
||||
"Audio volume (in dB). 0 dB is normal volume, and no gain is applied."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_AUDIO_WASAPI_EXCLUSIVE_MODE,
|
||||
"Allow the WASAPI driver to take exclusive control of the audio device. If disabled, use shared mode instead."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_AUDIO_WASAPI_FLOAT_FORMAT,
|
||||
"Use float format for the WASAPI driver, if supported by your audio device."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_AUDIO_WASAPI_SH_BUFFER_LENGTH,
|
||||
"The length of the buffer when using the WASAPI driver in shared mode."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_AUDIO_SYNC,
|
||||
"Synchronize audio. Recommended."
|
||||
|
@ -180,6 +180,9 @@ default_sublabel_macro(action_bind_sublabel_dynamic_wallpaper, MENU_
|
||||
default_sublabel_macro(action_bind_sublabel_audio_device, MENU_ENUM_SUBLABEL_AUDIO_DEVICE)
|
||||
default_sublabel_macro(action_bind_sublabel_audio_output_rate, MENU_ENUM_SUBLABEL_AUDIO_OUTPUT_RATE)
|
||||
default_sublabel_macro(action_bind_sublabel_audio_dsp_plugin, MENU_ENUM_SUBLABEL_AUDIO_DSP_PLUGIN)
|
||||
default_sublabel_macro(action_bind_sublabel_audio_wasapi_exclusive_mode, MENU_ENUM_SUBLABEL_AUDIO_WASAPI_EXCLUSIVE_MODE)
|
||||
default_sublabel_macro(action_bind_sublabel_audio_wasapi_float_format, MENU_ENUM_SUBLABEL_AUDIO_WASAPI_FLOAT_FORMAT)
|
||||
default_sublabel_macro(action_bind_sublabel_audio_wasapi_sh_buffer_length, MENU_ENUM_SUBLABEL_AUDIO_WASAPI_SH_BUFFER_LENGTH)
|
||||
default_sublabel_macro(action_bind_sublabel_overlay_opacity, MENU_ENUM_SUBLABEL_OVERLAY_OPACITY)
|
||||
default_sublabel_macro(action_bind_sublabel_overlay_scale, MENU_ENUM_SUBLABEL_OVERLAY_SCALE)
|
||||
default_sublabel_macro(action_bind_sublabel_overlay_enable, MENU_ENUM_SUBLABEL_INPUT_OVERLAY_ENABLE)
|
||||
@ -799,6 +802,15 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
||||
case MENU_ENUM_LABEL_AUDIO_DEVICE:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_audio_device);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_AUDIO_WASAPI_EXCLUSIVE_MODE:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_audio_wasapi_exclusive_mode);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_AUDIO_WASAPI_FLOAT_FORMAT:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_audio_wasapi_float_format);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_AUDIO_WASAPI_SH_BUFFER_LENGTH:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_audio_wasapi_sh_buffer_length);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_MENU_WALLPAPER:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_wallpaper);
|
||||
break;
|
||||
|
@ -5299,6 +5299,17 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_AUDIO_DSP_PLUGIN,
|
||||
PARSE_ONLY_PATH, false);
|
||||
#ifdef HAVE_WASAPI
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_AUDIO_WASAPI_EXCLUSIVE_MODE,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_AUDIO_WASAPI_FLOAT_FORMAT,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_AUDIO_WASAPI_SH_BUFFER_LENGTH,
|
||||
PARSE_ONLY_UINT, false);
|
||||
#endif
|
||||
|
||||
info->need_refresh = true;
|
||||
info->need_push = true;
|
||||
|
@ -1680,6 +1680,9 @@ void general_write_handler(void *data)
|
||||
case MENU_ENUM_LABEL_AUDIO_LATENCY:
|
||||
case MENU_ENUM_LABEL_AUDIO_DEVICE:
|
||||
case MENU_ENUM_LABEL_AUDIO_OUTPUT_RATE:
|
||||
case MENU_ENUM_LABEL_AUDIO_WASAPI_EXCLUSIVE_MODE:
|
||||
case MENU_ENUM_LABEL_AUDIO_WASAPI_FLOAT_FORMAT:
|
||||
case MENU_ENUM_LABEL_AUDIO_WASAPI_SH_BUFFER_LENGTH:
|
||||
rarch_cmd = CMD_EVENT_AUDIO_REINIT;
|
||||
break;
|
||||
case MENU_ENUM_LABEL_PAL60_ENABLE:
|
||||
@ -3920,6 +3923,57 @@ static bool setting_append_list(
|
||||
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_DSP_FILTER_INIT);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_LAKKA_ADVANCED);
|
||||
|
||||
#ifdef HAVE_WASAPI
|
||||
if (memcmp(settings->arrays.audio_driver, "wasapi", 6) == 0)
|
||||
{
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->bools.audio_wasapi_exclusive_mode,
|
||||
MENU_ENUM_LABEL_AUDIO_WASAPI_EXCLUSIVE_MODE,
|
||||
MENU_ENUM_LABEL_VALUE_AUDIO_WASAPI_EXCLUSIVE_MODE,
|
||||
true,
|
||||
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(
|
||||
list, list_info,
|
||||
&settings->bools.audio_wasapi_float_format,
|
||||
MENU_ENUM_LABEL_AUDIO_WASAPI_FLOAT_FORMAT,
|
||||
MENU_ENUM_LABEL_VALUE_AUDIO_WASAPI_FLOAT_FORMAT,
|
||||
true,
|
||||
MENU_ENUM_LABEL_VALUE_OFF,
|
||||
MENU_ENUM_LABEL_VALUE_ON,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler,
|
||||
SD_FLAG_ADVANCED
|
||||
);
|
||||
|
||||
CONFIG_UINT(
|
||||
list, list_info,
|
||||
&settings->uints.audio_wasapi_sh_buffer_length,
|
||||
MENU_ENUM_LABEL_AUDIO_WASAPI_SH_BUFFER_LENGTH,
|
||||
MENU_ENUM_LABEL_VALUE_AUDIO_WASAPI_SH_BUFFER_LENGTH,
|
||||
0,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
menu_settings_list_current_add_range(list, list_info, 0, 1024, 16.0, true, true);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
||||
}
|
||||
#endif
|
||||
|
||||
END_SUB_GROUP(list, list_info, parent_group);
|
||||
END_GROUP(list, list_info, parent_group);
|
||||
break;
|
||||
|
@ -960,6 +960,10 @@ enum msg_hash_enums
|
||||
MENU_LABEL(AUDIO_VOLUME),
|
||||
MENU_LABEL(AUDIO_RATE_CONTROL_DELTA),
|
||||
MENU_LABEL(AUDIO_LATENCY),
|
||||
MENU_LABEL(AUDIO_WASAPI_EXCLUSIVE_MODE),
|
||||
MENU_LABEL(AUDIO_WASAPI_FLOAT_FORMAT),
|
||||
MENU_LABEL(AUDIO_WASAPI_SH_BUFFER_LENGTH),
|
||||
|
||||
MENU_LABEL(SAVE_STATE),
|
||||
MENU_LABEL(LOAD_STATE),
|
||||
MENU_LABEL(UNDO_LOAD_STATE),
|
||||
|
Loading…
x
Reference in New Issue
Block a user