Prep stuff

no idea how to make these work uuuh
This commit is contained in:
alufolie91 committed 2023-08-19 05:23:35 +02:00
1 parent d22f08b064
commit 0875e4f5e0
4 files changed
+27 -1

No files matched your search

+2
View File
@@ -913,6 +913,8 @@ void D_RegisterClientCommands(void)
#ifdef HAVE_OPENMPT
CV_RegisterVar(&cv_modfilter);
CV_RegisterVar(&cv_amigafilter);
//CV_RegisterVar(&cv_amigatype);
//CV_RegisterVar(&cv_mptdither);
#endif
// FIXME: not to be here.. but needs be done for config loading
+3 -1
View File
@@ -1412,7 +1412,9 @@ static menuitem_t OP_SoundAdvancedMenu[] =
{IT_HEADER, NULL, "MOD", NULL, 10},
{IT_STRING | IT_CVAR, NULL, "Instrument Filter", &cv_modfilter, 22},
{IT_STRING | IT_CVAR, NULL, "Amiga Resampler", &cv_amigafilter, 42}
{IT_STRING | IT_CVAR, NULL, "Amiga Resampler", &cv_amigafilter, 42},
//{IT_STRING | IT_CVAR, NULL, "Amiga Type", &cv_amigatype, 62},
//{IT_STRING | IT_CVAR, NULL, "Dithering", &cv_mptdither, 82}
};
#endif
+21
View File
@@ -67,6 +67,8 @@ static void PlaySoundIfUnfocused_OnChange(void);
#ifdef HAVE_OPENMPT
static void ModFilter_OnChange(void);
static void AmigaFilter_OnChange(void);
//static void AmigaType_OnChange(void);
//static void MPTDither_OnChange(void);
#endif
// commands for music and sound servers
@@ -142,6 +144,12 @@ consvar_t cv_modfilter = {"modfilter", "4", CV_SAVE|CV_CALL, interpolationfilter
static CV_PossibleValue_t amigafilter_cons_t[] = {{0, "Off"}, {1, "On"}, {0, NULL}};
consvar_t cv_amigafilter = {"amigafilter", "1", CV_SAVE|CV_CALL, amigafilter_cons_t, AmigaFilter_OnChange, 0, NULL, NULL, 0, 0, NULL};
/*static CV_PossibleValue_t amigatype_cons_t[] = {{0, "auto"}, {1, "a500"}, {2, "a1200"}, {4, "unfiltered"}, {0, NULL}};
consvar_t cv_amigatype = {"amigatype", "1", CV_SAVE|CV_CALL, amigatype_cons_t, AmigaType_OnChange, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t mptdither_cons_t[] = {{0, "No dithering"}, {1, "Default"}, {2, "Rectangular 0.5 bit"}, {3, "Rectangular 1 bit"}, {0, NULL}};
consvar_t cv_mptdither = {"mptdither", "1", CV_SAVE|CV_CALL, mptdither_cons_t, MPTDither_OnChange, 0, NULL, NULL, 0, 0, NULL};*/
#endif
#define S_MAX_VOLUME 127
@@ -2205,6 +2213,19 @@ void AmigaFilter_OnChange(void)
openmpt_module_ctl_set(openmpt_mhandle, "render.resampler.emulate_amiga", cv_amigafilter.value ? "1" : "0");
}
/*
void AmigaType_OnChange(void)
{
if (openmpt_mhandle)
openmpt_module_ctl_set(openmpt_mhandle, "render.resampler.emulate_amiga", cv_amigatype.value ? "1" : "0");
}
void MPTDither_OnChange(void)
{
if (openmpt_mhandle)
openmpt_module_ctl_set(openmpt_mhandle, "dither", cv_mptdither.value);
}*/
#ifndef NO_MIDI
void GameMIDIMusic_OnChange(void)
{
+1
View File
@@ -45,6 +45,7 @@ extern consvar_t cv_playsoundifunfocused;
#ifdef HAVE_OPENMPT
extern consvar_t cv_modfilter;
extern consvar_t cv_amigafilter;
//extern consvar_t cv_mptdither;
#endif
extern consvar_t cv_music_resync_threshold;