Skip to content

Commit

Permalink
Add the Sound Quality option.
Browse files Browse the repository at this point in the history
This option should change the sample rate to 44.1kHz instead of the original.
  • Loading branch information
drHyperion451 committed Apr 25, 2024
1 parent b444798 commit 060541a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Quake/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -3219,6 +3219,7 @@ void M_Menu_Gamepad_f (void)
\
def (OPT_SNDVOL, "Sound Volume") \
def (OPT_MUSICVOL, "Music Volume") \
def (OPT_SNDQUAL, "Sound Quality") \
def (OPT_MUSICEXT, "External Music") \
////////////////////////////////////////////////////
#define VIDEO_OPTIONS_LIST(def) \
Expand Down Expand Up @@ -3596,6 +3597,9 @@ void M_AdjustSliders (int dir)
else if (f > 1) f = 1;
Cvar_SetValue ("volume", f);
break;
case OPT_SNDQUAL: // Change sample rate from 11.5kHz to 44.1kHz
Cvar_Set ("sndspeed", sndspeed.value ? "11025" : "44100");
break;

case OPT_HUDSTYLE: // hud style
Cvar_SetValueQuick (&scr_hudstyle, ((int) q_max (scr_hudstyle.value, 0.f) + (int) HUD_COUNT + dir) % (int) HUD_COUNT);
Expand Down Expand Up @@ -4054,6 +4058,10 @@ static void M_Options_DrawItem (int y, int item)
M_DrawSlider (x, y, r);
break;

case OPT_SNDQUAL:
M_Print (x, y, sndspeed.value == 11025 ? "Original" : "Remastered");
break;

case OPT_MUSICVOL:
r = bgmvolume.value;
M_DrawSlider (x, y, r);
Expand Down

0 comments on commit 060541a

Please sign in to comment.