delet the bird music resynching stuff

idk who even wants this, its pain, and even more pain to adapt
This commit is contained in:
Alug committed 2025-12-04 06:15:10 +01:00
1 parent b28f3998e5
commit 92445b2fdc
5 files changed
-71

No files matched your search

-2
View File
@@ -158,8 +158,6 @@ UINT32 I_GetSongLoopPoint(void);
boolean I_SetSongPosition(UINT32 position);
UINT32 I_GetSongPosition(void);
void I_UpdateSongLagThreshold (void);
/// ------------------------
// MUSIC PLAYBACK
/// ------------------------
-7
View File
@@ -2182,9 +2182,6 @@ static menuitem_t OP_AdvancedBirdMenu[] =
{IT_STRING | IT_CVAR, NULL, "Fade Back from Grow", &cv_growmusicfade, 20},
{IT_STRING | IT_CVAR, NULL, "Fade Out Before Respawning", &cv_respawnfademusicout, 30},
{IT_STRING | IT_CVAR, NULL, "Fade Back In While Respawning", &cv_respawnfademusicback, 40},
{IT_STRING | IT_CVAR, NULL, "Resync Threshold", &cv_music_resync_threshold, 60},
{IT_STRING | IT_CVAR, NULL, "Resync Special Music Only", &cv_music_resync_powerups_only, 70},
};
static const char* OP_AdvancedBirdTooltips[] =
@@ -2194,8 +2191,6 @@ static const char* OP_AdvancedBirdTooltips[] =
"Fade in music after Grow.",
"Fade out music before respawning.",
"Fade in music while respawning.",
"Threshold for syncing music.",
"Only sync special music.",
};
enum
@@ -2205,8 +2200,6 @@ enum
fadegrow,
respawnfadeout,
respawnfadein,
syncthreshold,
syncspecialonly,
};
menuitem_t OP_CustomCvarMenu[MAXMENUCCVARS];
-13
View File
@@ -94,14 +94,6 @@ consvar_t cv_playsoundifunfocused = {"playsoundsifunfocused", "No", CV_SAVE, CV_
consvar_t cv_pausemusic = {"playmusicifpaused", "No", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
//bird music stuff
static CV_PossibleValue_t music_resync_threshold_cons_t[] = {
{0, "MIN"},
{1000, "MAX"},
{0}
};
consvar_t cv_music_resync_threshold = {"music_resync_threshold", "0", CV_SAVE|CV_CALL, music_resync_threshold_cons_t, I_UpdateSongLagThreshold, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_music_resync_powerups_only = {"music_resync_powerups_only", "No", CV_SAVE|CV_CALL, CV_YesNo, I_UpdateSongLagThreshold, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_invincmusicfade = {"invincmusicfade", "300", CV_SAVE, CV_Unsigned, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_growmusicfade = {"growmusicfade", "500", CV_SAVE, CV_Unsigned, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_respawnfademusicout = {"respawnfademusicout", "1000", CV_SAVE, CV_Unsigned, NULL, 0, NULL, NULL, 0, 0, NULL};
@@ -288,9 +280,6 @@ void S_RegisterSoundStuff(void)
CV_RegisterVar(&cv_playsoundifunfocused);
CV_RegisterVar(&cv_pausemusic);
CV_RegisterVar(&cv_music_resync_threshold);
CV_RegisterVar(&cv_music_resync_powerups_only);
CV_RegisterVar(&cv_invincmusicfade);
CV_RegisterVar(&cv_growmusicfade);
@@ -1717,8 +1706,6 @@ static boolean S_PlayMusic(boolean looping, UINT32 fadeinms)
if (S_MusicDisabled())
return false;
I_UpdateSongLagThreshold();
if ((!fadeinms && !I_PlaySong(looping)) ||
(fadeinms && !I_FadeInPlaySong(fadeinms, looping)))
{
-3
View File
@@ -57,9 +57,6 @@ extern consvar_t cv_amigatype;
boolean S_MapMusPlaying(void);
//bird music stuff
extern consvar_t cv_music_resync_threshold;
extern consvar_t cv_music_resync_powerups_only;
extern consvar_t cv_invincmusicfade;
extern consvar_t cv_growmusicfade;
-46
View File
@@ -75,11 +75,6 @@ typedef struct sndlump_s
UINT8 sound_started = false;
/*static UINT32 stutter_threshold;
static UINT32 music_end_bytes;
static UINT32 music_bytes;
static UINT32 music_stutter_bytes;*/
static SDL_AudioDeviceID audio_device;
static SDL_AudioStream *audio_stream;
static SDL_AudioSpec virtual_spec; // audio spec used internally in the engine
@@ -1103,42 +1098,6 @@ void I_ShutdownMusic(void)
I_UnloadSong();
}
#if 0
static void Countstutter(int len)
{
UINT32 bytes;
music_bytes += len;
if (gamestate != GS_LEVEL)
return;
if (hu_stopped)
{
music_stutter_bytes += len;
}
else if (stutter_threshold)
{
if (music_stutter_bytes >= stutter_threshold)
{
/*
This would be after looping. If we're too near to the start of the
file, subtracting the delta will just underflow.
*/
if (music_stutter_bytes > music_bytes)
{
/* We already know where the end is because we looped. */
bytes = ( music_end_bytes - ( music_stutter_bytes - music_bytes ));
}
else
bytes = ( music_bytes - music_stutter_bytes );
I_SetSongPosition((int)((float)bytes/4/44100.0f*1000));
}
}
}
#endif
/// ------------------------
/// Music Properties
/// ------------------------
@@ -1444,11 +1403,6 @@ static void ResetMusic(void)
music_speed = 1.0f;
}
void I_UpdateSongLagThreshold(void)
{
//stutter_threshold = cv_music_resync_powerups_only.value ? 0 : (cv_music_resync_threshold.value/1000.0*(4*44100));
}
boolean I_LoadSong(char *data, size_t len)
{
char *p = data;