mirror of
https://github.com/libretro/RetroArch
synced 2025-04-17 02:43:03 +00:00
(PS3/Xbox 1/Rmenu) Add resampler type option
This commit is contained in:
parent
53e766762e
commit
094d076944
@ -290,6 +290,21 @@ static void populate_setting_item(void *data, unsigned input)
|
||||
snprintf(current_item->setting_text, sizeof(current_item->setting_text), "");
|
||||
snprintf(current_item->comment, sizeof(current_item->comment), "INFO - Set all [General Audio Settings] back to their 'DEFAULT' values.");
|
||||
break;
|
||||
case SETTING_RESAMPLER_TYPE:
|
||||
snprintf(current_item->text, sizeof(current_item->text), "Sound resampler");
|
||||
#ifdef HAVE_SINC
|
||||
if (strstr(g_settings.audio.resampler, "sinc"))
|
||||
{
|
||||
snprintf(current_item->setting_text, sizeof(current_item->setting_text), "Sinc");
|
||||
snprintf(current_item->comment, sizeof(current_item->comment), "INFO - [Sinc resampler] - slower but moreaccurate sound.");
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
snprintf(current_item->setting_text, sizeof(current_item->setting_text), "Hermite");
|
||||
snprintf(current_item->comment, sizeof(current_item->comment), "INFO - [Hermite resampler] - faster but less accurate with high sampling rates (such as 44KHz/48KHz).");
|
||||
}
|
||||
break;
|
||||
case SETTING_EMU_CURRENT_SAVE_STATE_SLOT:
|
||||
snprintf(current_item->text, sizeof(current_item->text), "Current save state slot");
|
||||
snprintf(current_item->setting_text, sizeof(current_item->setting_text), "%d", g_extern.state_slot);
|
||||
@ -1425,6 +1440,40 @@ static int set_setting_action(void *data, unsigned switchvalue, uint64_t input)
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
case SETTING_RESAMPLER_TYPE:
|
||||
if((input & (1ULL << RMENU_DEVICE_NAV_LEFT)) || (input & (1ULL << RMENU_DEVICE_NAV_RIGHT)) || (input & (1ULL << RMENU_DEVICE_NAV_B)))
|
||||
{
|
||||
#ifdef HAVE_SINC
|
||||
if( strstr(g_settings.audio.resampler, "hermite"))
|
||||
snprintf(g_settings.audio.resampler, sizeof(g_settings.audio.resampler), "sinc");
|
||||
else
|
||||
#endif
|
||||
snprintf(g_settings.audio.resampler, sizeof(g_settings.audio.resampler), "hermite");
|
||||
|
||||
if (g_extern.main_is_init)
|
||||
{
|
||||
if (rarch_resampler_realloc(&g_extern.audio_data.resampler_data, &g_extern.audio_data.resampler,
|
||||
g_settings.audio.resampler))
|
||||
{
|
||||
/* TODO */
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if(input & (1ULL << RMENU_DEVICE_NAV_START))
|
||||
{
|
||||
snprintf(g_settings.audio.resampler, sizeof(g_settings.audio.resampler), "hermite");
|
||||
|
||||
if (g_extern.main_is_init)
|
||||
{
|
||||
if (rarch_resampler_realloc(&g_extern.audio_data.resampler_data, &g_extern.audio_data.resampler,
|
||||
g_settings.audio.resampler))
|
||||
{
|
||||
/* TODO */
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SETTING_EMU_AUDIO_MUTE:
|
||||
if((input & (1ULL << RMENU_DEVICE_NAV_LEFT)) || (input & (1ULL << RMENU_DEVICE_NAV_RIGHT)) || (input & (1ULL << RMENU_DEVICE_NAV_B)))
|
||||
rmenu_settings_set(S_AUDIO_MUTE);
|
||||
|
@ -134,6 +134,7 @@ enum
|
||||
#ifdef HAVE_RSOUND
|
||||
SETTING_RSOUND_SERVER_IP_ADDRESS,
|
||||
#endif
|
||||
SETTING_RESAMPLER_TYPE,
|
||||
SETTING_ENABLE_CUSTOM_BGM,
|
||||
SETTING_DEFAULT_AUDIO_ALL,
|
||||
SETTING_EMU_CURRENT_SAVE_STATE_SLOT,
|
||||
|
Loading…
x
Reference in New Issue
Block a user