diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 6043141b3..f9f1f9c75 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -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 diff --git a/src/m_menu.c b/src/m_menu.c index a97151052..49d41fd54 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -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 diff --git a/src/s_sound.c b/src/s_sound.c index 8627903d5..315c0b2a3 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -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) { diff --git a/src/s_sound.h b/src/s_sound.h index ee04ad4ad..1d1170bd2 100644 --- a/src/s_sound.h +++ b/src/s_sound.h @@ -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;