mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 07:17:45 -04:00
sound, add FM filtering
This commit is contained in:
parent
21e0cd52e6
commit
68a950875c
13 changed files with 73 additions and 854 deletions
|
@ -446,9 +446,13 @@ static int menu_loop_keyconfig(int id, int keys)
|
|||
|
||||
// ------------ MD options menu ------------
|
||||
|
||||
static const char h_fmfilter[] = "improves sound quality but is noticeably slower\n"
|
||||
"best option if native rate isn't working";
|
||||
|
||||
static menu_entry e_menu_md_options[] =
|
||||
{
|
||||
mee_enum ("Renderer", MA_OPT_RENDERER, currentConfig.renderer, renderer_names),
|
||||
mee_onoff_h ("FM filtering", MA_OPT_FM_FILTER, PicoIn.opt, POPT_EN_FM_FILTER, h_fmfilter),
|
||||
mee_end,
|
||||
};
|
||||
|
||||
|
@ -618,23 +622,24 @@ static int menu_loop_adv_options(int id, int keys)
|
|||
static int sndrate_prevnext(int rate, int dir)
|
||||
{
|
||||
static const int rates[] = { 8000, 11025, 16000, 22050, 44100, 53000 };
|
||||
int rate_count = sizeof(rates)/sizeof(rates[0]);
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < rate_count; i++)
|
||||
if (rates[i] == rate) break;
|
||||
|
||||
i += dir ? 1 : -1;
|
||||
if (i > 5) {
|
||||
if (i >= rate_count) {
|
||||
if (!(PicoIn.opt & POPT_EN_STEREO)) {
|
||||
PicoIn.opt |= POPT_EN_STEREO;
|
||||
return rates[0];
|
||||
}
|
||||
return rates[5];
|
||||
return rates[rate_count-1];
|
||||
}
|
||||
if (i < 0) {
|
||||
if (PicoIn.opt & POPT_EN_STEREO) {
|
||||
PicoIn.opt &= ~POPT_EN_STEREO;
|
||||
return rates[5];
|
||||
return rates[rate_count-1];
|
||||
}
|
||||
return rates[0];
|
||||
}
|
||||
|
@ -676,8 +681,8 @@ static const char *mgn_opt_alpha(int id, int *offs)
|
|||
return static_buff;
|
||||
}
|
||||
|
||||
static const char h_quality[] = "native is the FM sound chip rate (53267/52781 Hz),\n"
|
||||
"select this for the best FM sound quality";
|
||||
static const char h_quality[] = "native is the Megadrive sound chip rate (~53000),\n"
|
||||
"best quality, but might not work on some devices";
|
||||
static const char h_lowpass[] = "Low pass filter for sound closer to real hardware";
|
||||
|
||||
static menu_entry e_menu_snd_options[] =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue