From 81e9b662b57b542ecc38469effd9779269b1ce42 Mon Sep 17 00:00:00 2001 From: James R Date: Sun, 22 Dec 2019 20:26:01 -0800 Subject: [PATCH] Purge i_cdmus because no one is playing music from a CD and it didn't work anyway --- src/Makefile | 1 - src/Makefile.cfg | 1 - src/d_main.c | 7 ------ src/d_netcmd.c | 4 ---- src/i_sound.h | 51 +----------------------------------------- src/p_setup.c | 4 ---- src/s_sound.c | 10 --------- src/s_sound.h | 2 -- src/sdl/CMakeLists.txt | 1 - src/sdl/i_cdmus.c | 37 ------------------------------ src/sdl/i_system.c | 12 ++++------ 11 files changed, 5 insertions(+), 125 deletions(-) delete mode 100644 src/sdl/i_cdmus.c diff --git a/src/Makefile b/src/Makefile index c30c236de..9d3dfeb9f 100644 --- a/src/Makefile +++ b/src/Makefile @@ -484,7 +484,6 @@ OBJS:=$(i_main_o) \ $(OBJDIR)/lzf.o \ $(OBJDIR)/vid_copy.o \ $(OBJDIR)/b_bot.o \ - $(i_cdmus_o) \ $(i_net_o) \ $(i_system_o) \ $(i_sound_o) \ diff --git a/src/Makefile.cfg b/src/Makefile.cfg index 409cc4f22..8a254cfef 100644 --- a/src/Makefile.cfg +++ b/src/Makefile.cfg @@ -257,7 +257,6 @@ endif endif #determine the interface directory (where you put all i_*.c) -i_cdmus_o=$(OBJDIR)/i_cdmus.o i_net_o=$(OBJDIR)/i_net.o i_system_o=$(OBJDIR)/i_system.o i_sound_o=$(OBJDIR)/i_sound.o diff --git a/src/d_main.c b/src/d_main.c index ef6502aec..91f1e6282 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -669,9 +669,6 @@ void D_SRB2Loop(void) S_UpdateSounds(); // move positional sounds S_UpdateClosedCaptions(); - // check for media change, loop music.. - I_UpdateCD(); - #ifdef HW3SOUND HW3S_EndFrameUpdate(); #endif @@ -1236,10 +1233,6 @@ void D_SRB2Main(void) //------------------------------------------------ COMMAND LINE PARAMS - // Initialize CD-Audio - if (M_CheckParm("-usecd") && !dedicated) - I_InitCD(); - if (M_CheckParm("-noupload")) COM_BufAddText("downloading 0\n"); diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 262d0d1bc..ea0e44ab9 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -834,10 +834,6 @@ void D_RegisterClientCommands(void) CV_RegisterVar(&cv_midimusicvolume); CV_RegisterVar(&cv_numChannels); - // i_cdmus.c - CV_RegisterVar(&cd_volume); - CV_RegisterVar(&cdUpdate); - // screen.c CV_RegisterVar(&cv_fullscreen); CV_RegisterVar(&cv_renderview); diff --git a/src/i_sound.h b/src/i_sound.h index fbaa93053..cabee6eea 100644 --- a/src/i_sound.h +++ b/src/i_sound.h @@ -9,7 +9,7 @@ // See the 'LICENSE' file for more details. //----------------------------------------------------------------------------- /// \file i_sound.h -/// \brief System interface, sound, music and CD +/// \brief System interface, sound and music #ifndef __I_SOUND__ #define __I_SOUND__ @@ -241,53 +241,4 @@ boolean I_FadeSong(UINT8 target_volume, UINT32 ms, void (*callback)(void)); boolean I_FadeOutStopSong(UINT32 ms); boolean I_FadeInPlaySong(UINT32 ms, boolean looping); -/// ------------------------ -// CD MUSIC I/O -/// ------------------------ - -/** \brief cd music interface -*/ -extern UINT8 cdaudio_started; - -/** \brief Startup the CD system -*/ -void I_InitCD(void); - -/** \brief Stop the CD playback -*/ -void I_StopCD(void); - -/** \brief Pause the CD playback -*/ -void I_PauseCD(void); - -/** \brief Resume the CD playback -*/ -void I_ResumeCD(void); - -/** \brief Shutdown the CD system -*/ -void I_ShutdownCD(void); - -/** \brief Update the CD info -*/ -void I_UpdateCD(void); - -/** \brief The I_PlayCD function - - \param track CD track number - \param looping if true, loop the track - - \return void -*/ -void I_PlayCD(UINT8 track, UINT8 looping); - -/** \brief The I_SetVolumeCD function - - \param volume volume level to set at - - \return return 0 on failure -*/ -boolean I_SetVolumeCD(INT32 volume); - #endif diff --git a/src/p_setup.c b/src/p_setup.c index bf3493d8c..d33891174 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -21,7 +21,6 @@ #include "p_spec.h" #include "p_saveg.h" -#include "i_sound.h" // for I_PlayCD().. #include "i_video.h" // for I_FinishUpdate().. #include "r_sky.h" #include "i_system.h" @@ -3202,9 +3201,6 @@ boolean P_SetupLevel(boolean skipprecip) // clear special respawning que iquehead = iquetail = 0; - // Fab : 19-07-98 : start cd music for this level (note: can be remapped) - I_PlayCD((UINT8)(gamemap), false); - P_MapEnd(); // Remove the loading shit from the screen diff --git a/src/s_sound.c b/src/s_sound.c index a49499040..c7cea0c92 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -2305,13 +2305,6 @@ void S_PauseAudio(void) if (I_SongPlaying() && !I_SongPaused()) I_PauseSong(); - // pause cd music -#if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (HAVE_SDL) - I_PauseCD(); -#else - I_StopCD(); -#endif - S_SetStackAdjustmentStart(); } @@ -2323,9 +2316,6 @@ void S_ResumeAudio(void) if (I_SongPlaying() && I_SongPaused()) I_ResumeSong(); - // resume cd music - I_ResumeCD(); - S_AdjustMusicStackTics(); } diff --git a/src/s_sound.h b/src/s_sound.h index 18f2d3743..600b09ab2 100644 --- a/src/s_sound.h +++ b/src/s_sound.h @@ -66,8 +66,6 @@ extern consvar_t musserver_cmd, musserver_arg; #endif extern CV_PossibleValue_t soundvolume_cons_t[]; -//part of i_cdmus.c -extern consvar_t cd_volume, cdUpdate; #if defined (macintosh) && !defined (HAVE_SDL) typedef enum diff --git a/src/sdl/CMakeLists.txt b/src/sdl/CMakeLists.txt index 38d557a3f..a019aa3b0 100644 --- a/src/sdl/CMakeLists.txt +++ b/src/sdl/CMakeLists.txt @@ -30,7 +30,6 @@ set(SRB2_SDL2_SOURCES dosstr.c endtxt.c hwsym_sdl.c - i_cdmus.c i_main.c i_net.c i_system.c diff --git a/src/sdl/i_cdmus.c b/src/sdl/i_cdmus.c deleted file mode 100644 index 5d086e73a..000000000 --- a/src/sdl/i_cdmus.c +++ /dev/null @@ -1,37 +0,0 @@ -#include "../command.h" -#include "../s_sound.h" -#include "../i_sound.h" - -// -// CD MUSIC I/O -// - -UINT8 cdaudio_started = 0; - -consvar_t cd_volume = {"cd_volume","31",CV_SAVE,soundvolume_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; -consvar_t cdUpdate = {"cd_update","1",CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL}; - - -void I_InitCD(void){} - -void I_StopCD(void){} - -void I_PauseCD(void){} - -void I_ResumeCD(void){} - -void I_ShutdownCD(void){} - -void I_UpdateCD(void){} - -void I_PlayCD(UINT8 track, UINT8 looping) -{ - (void)track; - (void)looping; -} - -FUNCMATH boolean I_SetVolumeCD(int volume) -{ - (void)volume; - return false; -} diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index 13fb25bea..6f6de43b5 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -2186,7 +2186,6 @@ void I_Quit(void) D_QuitNetGame(); I_ShutdownMusic(); I_ShutdownSound(); - I_ShutdownCD(); // use this for 1.28 19990220 by Kin I_ShutdownGraphics(); I_ShutdownInput(); @@ -2247,16 +2246,14 @@ void I_Error(const char *error, ...) if (errorcount == 3) I_ShutdownSound(); if (errorcount == 4) - I_ShutdownCD(); - if (errorcount == 5) I_ShutdownGraphics(); - if (errorcount == 6) + if (errorcount == 5) I_ShutdownInput(); - if (errorcount == 7) + if (errorcount == 6) I_ShutdownSystem(); - if (errorcount == 8) + if (errorcount == 7) SDL_Quit(); - if (errorcount == 9) + if (errorcount == 8) { M_SaveConfig(NULL); G_SaveGameData(); @@ -2304,7 +2301,6 @@ void I_Error(const char *error, ...) D_QuitNetGame(); I_ShutdownMusic(); I_ShutdownSound(); - I_ShutdownCD(); // use this for 1.28 19990220 by Kin I_ShutdownGraphics(); I_ShutdownInput();