sound, add FM filtering

This commit is contained in:
kub 2022-04-14 17:32:40 +00:00
parent 21e0cd52e6
commit 68a950875c
13 changed files with 73 additions and 854 deletions

View file

@ -1640,6 +1640,15 @@ static void update_variables(bool first_run)
PicoIn.opt &= ~POPT_EN_FM_DAC;
}
var.value = NULL;
var.key = "picodrive_fm_filter";
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value) {
if (strcmp(var.value, "on") == 0)
PicoIn.opt |= POPT_EN_FM_FILTER;
else
PicoIn.opt &= ~POPT_EN_FM_FILTER;
}
old_snd_filter = PicoIn.opt & POPT_EN_SNDFILTER;
var.value = NULL;
var.key = "picodrive_audio_filter";

View file

@ -207,7 +207,7 @@ struct retro_core_option_v2_definition option_defs_us[] = {
"picodrive_sound_rate",
"Audio Sample Rate (Hz)",
"Sample Rate (Hz)",
"Higher values increase sound quality. Lower values may increase performance. Native is the FM sound chip rate, either 53267 Hz for NTSC or 52781 Hz for PAL. Select this if you want the most accurate audio.",
"Higher values increase sound quality. Lower values may increase performance. Native is the Megadrive sound chip rate (~53000). Select this if you want the most accurate audio.",
NULL,
"audio",
{
@ -220,6 +220,20 @@ struct retro_core_option_v2_definition option_defs_us[] = {
},
"44100"
},
{
"picodrive_fm_filter",
"FM filtering",
NULL,
"Enable filtering for Mega Drive FM sound at non-native bitrates. Sound output will improve, at the price of being noticeably slower",
NULL,
"audio",
{
{ "off", "disabled" },
{ "on", "enabled" },
{ NULL, NULL },
},
"off"
},
{
"picodrive_smsfm",
"Master System FM Sound Unit",