Expose internal audio RF filter option
This commit is contained in:
@@ -1136,6 +1136,7 @@ static bool update_option_visibility(void)
|
||||
char options_list[][25] = {
|
||||
"fceumm_sndvolume",
|
||||
"fceumm_sndquality",
|
||||
"fceumm_sndlowpass",
|
||||
"fceumm_swapduty",
|
||||
"fceumm_apu_1",
|
||||
"fceumm_apu_2",
|
||||
@@ -1822,6 +1823,14 @@ static void check_variables(bool startup)
|
||||
FCEUI_SetSoundQuality(sndquality);
|
||||
}
|
||||
|
||||
var.key = "fceumm_sndlowpass";
|
||||
|
||||
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
|
||||
{
|
||||
int lowpass = (!strcmp(var.value, "enabled")) ? 1 : 0;
|
||||
FCEUI_SetLowPass(lowpass);
|
||||
}
|
||||
|
||||
var.key = "fceumm_sndvolume";
|
||||
|
||||
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
|
||||
|
||||
@@ -21,7 +21,7 @@ extern "C" {
|
||||
********************************
|
||||
*/
|
||||
|
||||
#define MAX_CORE_OPTIONS 35
|
||||
#define MAX_CORE_OPTIONS 36
|
||||
|
||||
/* RETRO_LANGUAGE_ENGLISH */
|
||||
|
||||
@@ -254,6 +254,20 @@ struct retro_core_option_v2_definition option_defs[] = {
|
||||
},
|
||||
"Low",
|
||||
},
|
||||
{
|
||||
"fceumm_sndlowpass",
|
||||
"Audio RF Filter",
|
||||
NULL,
|
||||
"Apply a low pass audio filter to simulate the 'muted' sound of the NES when connected to a television via the RF modulator.",
|
||||
NULL,
|
||||
"audio",
|
||||
{
|
||||
{ "disabled", NULL },
|
||||
{ "enabled", NULL },
|
||||
{ NULL, NULL },
|
||||
},
|
||||
"disabled",
|
||||
},
|
||||
{
|
||||
"fceumm_swapduty",
|
||||
"Swap Audio Duty Cycles",
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
int32 NeoFilterSound(int32 *in, int32 *out, uint32 inlen, int32 *leftover);
|
||||
void MakeFilters(int32 rate);
|
||||
void SexyFilter(int32 *in, int32 *out, int32 count);
|
||||
void SexyFilter2(int32 *in, int32 count);
|
||||
|
||||
extern int64 sexyfilter_acc1, sexyfilter_acc2;
|
||||
|
||||
|
||||
@@ -992,8 +992,8 @@ int FlushEmulateSound(void) {
|
||||
|
||||
SexyFilter(Wave, WaveFinal, end >> 4);
|
||||
|
||||
/* if (FSettings.lowpass)
|
||||
SexyFilter2(WaveFinal, end >> 4); */
|
||||
if (FSettings.lowpass)
|
||||
SexyFilter2(WaveFinal, end >> 4);
|
||||
|
||||
if (end & 0xF)
|
||||
Wave[0] = Wave[(end >> 4)];
|
||||
|
||||
Reference in New Issue
Block a user