Somewhat changable Amiga emulation Types

need to restart music for it to apply for now
This commit is contained in:
alufolie91 committed 2023-08-19 18:59:24 +02:00
1 parent 2841e37ae9
commit 3e365e3ab4
6 files changed
+23 -22

No files matched your search

+3 -3
View File
@@ -913,9 +913,9 @@ void D_RegisterClientCommands(void)
#ifdef HAVE_OPENMPT
CV_RegisterVar(&cv_modfilter);
CV_RegisterVar(&cv_amigafilter);
//#if OPENMPT_API_VERSION_MAJOR < 1 && OPENMPT_API_VERSION_MINOR > 4
//CV_RegisterVar(&cv_amigatype);
//#endif
#if OPENMPT_API_VERSION_MAJOR < 1 && OPENMPT_API_VERSION_MINOR > 4
CV_RegisterVar(&cv_amigatype);
#endif
//CV_RegisterVar(&cv_mptdither);
#endif
+1 -1
View File
@@ -2282,7 +2282,7 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
// From PrBoom:
//
// e6y: Check whether the player can look beyond this line, rturns true if we can't
// e6y: Check whether the player can look beyond this line, returns true if we can't
//
boolean checkforemptylines = true;
+3 -3
View File
@@ -1413,9 +1413,9 @@ static menuitem_t OP_SoundAdvancedMenu[] =
{IT_STRING | IT_CVAR, NULL, "Instrument Filter", &cv_modfilter, 22},
{IT_STRING | IT_CVAR, NULL, "Amiga Resampler", &cv_amigafilter, 42},
//#if OPENMPT_API_VERSION_MAJOR < 1 && OPENMPT_API_VERSION_MINOR > 4
//{IT_STRING | IT_CVAR, NULL, "Amiga Type", &cv_amigatype, 62},
//#endif
#if OPENMPT_API_VERSION_MAJOR < 1 && OPENMPT_API_VERSION_MINOR > 4
{IT_STRING | IT_CVAR, NULL, "Amiga Type", &cv_amigatype, 62},
#endif
//{IT_STRING | IT_CVAR, NULL, "Dithering", &cv_mptdither, 82}
};
#endif
+12 -11
View File
@@ -67,9 +67,9 @@ static void PlaySoundIfUnfocused_OnChange(void);
#ifdef HAVE_OPENMPT
static void ModFilter_OnChange(void);
static void AmigaFilter_OnChange(void);
//#if OPENMPT_API_VERSION_MAJOR < 1 && OPENMPT_API_VERSION_MINOR > 4
//static void AmigaType_OnChange(void);
//#endif
#if OPENMPT_API_VERSION_MAJOR < 1 && OPENMPT_API_VERSION_MINOR > 4
static void AmigaType_OnChange(void);
#endif
//static void MPTDither_OnChange(void);
#endif
@@ -147,14 +147,14 @@ 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};
/*
#if OPENMPT_API_VERSION_MAJOR < 1 && OPENMPT_API_VERSION_MINOR > 4
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 amigatype_cons_t[] = {{0, "auto"}, {1, "a500"}, {2, "a1200"}, {3, "unfiltered"}, {0, NULL}};
consvar_t cv_amigatype = {"amigatype", "0", CV_SAVE|CV_CALL, amigatype_cons_t, AmigaType_OnChange, 0, NULL, NULL, 0, 0, NULL};
#endif
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};*/
//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
@@ -2219,15 +2219,16 @@ void AmigaFilter_OnChange(void)
openmpt_module_ctl_set(openmpt_mhandle, "render.resampler.emulate_amiga", cv_amigafilter.value ? "1" : "0");
}
/*
#if OPENMPT_API_VERSION_MAJOR < 1 && OPENMPT_API_VERSION_MINOR > 4
void AmigaType_OnChange(void)
{
if (openmpt_mhandle)
openmpt_module_ctl_set(openmpt_mhandle, "render.resampler.emulate_amiga", cv_amigatype.value ? "1" : "0");
openmpt_module_ctl_set_text(openmpt_mhandle, "render.resampler.emulate_amiga", cv_amigatype.string);
}
#endif
/*
void MPTDither_OnChange(void)
{
if (openmpt_mhandle)
+3 -3
View File
@@ -45,9 +45,9 @@ extern consvar_t cv_playsoundifunfocused;
#ifdef HAVE_OPENMPT
extern consvar_t cv_modfilter;
extern consvar_t cv_amigafilter;
//#if OPENMPT_API_VERSION_MAJOR < 1 && OPENMPT_API_VERSION_MINOR > 4
//extern consvar_t cv_amigatype;
//#endif
#if OPENMPT_API_VERSION_MAJOR < 1 && OPENMPT_API_VERSION_MINOR > 4
extern consvar_t cv_amigatype;
#endif
//extern consvar_t cv_mptdither;
#endif
+1 -1
View File
@@ -1258,7 +1258,7 @@ boolean I_PlaySong(boolean looping)
openmpt_module_select_subsong(openmpt_mhandle, 0);
openmpt_module_ctl_set(openmpt_mhandle, "render.resampler.emulate_amiga", cv_amigafilter.value ? "1" : "0");
#if OPENMPT_API_VERSION_MAJOR < 1 && OPENMPT_API_VERSION_MINOR > 4
openmpt_module_ctl_set(openmpt_mhandle, "render.resampler.emulate_amiga_type", "auto");
openmpt_module_ctl_set_text(openmpt_mhandle, "render.resampler.emulate_amiga_type", cv_amigatype.string);
#endif
openmpt_module_ctl_set(openmpt_mhandle, "dither", "1");
openmpt_module_set_render_param(openmpt_mhandle, OPENMPT_MODULE_RENDER_INTERPOLATIONFILTER_LENGTH, cv_modfilter.value);