diff --git a/source/blood/src/asound.cpp b/source/blood/src/asound.cpp index 1acfdc0b6..938afb12c 100644 --- a/source/blood/src/asound.cpp +++ b/source/blood/src/asound.cpp @@ -24,7 +24,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "ns.h" // Must come before everything else! #include "build.h" -#include "fx_man.h" #include "common_game.h" //#include "blood.h" #include "view.h" diff --git a/source/blood/src/blood.cpp b/source/blood/src/blood.cpp index ad6e28623..7961b6b20 100644 --- a/source/blood/src/blood.cpp +++ b/source/blood/src/blood.cpp @@ -27,7 +27,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "mmulti.h" #include "compat.h" #include "renderlayer.h" -#include "fx_man.h" #include "common.h" #include "common_game.h" @@ -72,6 +71,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "m_argv.h" #include "statistics.h" #include "menu/menu.h" +#include "sound/s_soundinternal.h" #ifdef _WIN32 # include @@ -1365,7 +1365,7 @@ RESTART: { UpdateDacs(0, true); Mus_Stop(); - FX_StopAllSounds_(); + soundEngine->StopAllChannels(); gQuitGame = 0; gQuitRequest = 0; gRestartGame = 0; diff --git a/source/blood/src/credits.cpp b/source/blood/src/credits.cpp index 775a61688..009f2bf74 100644 --- a/source/blood/src/credits.cpp +++ b/source/blood/src/credits.cpp @@ -26,7 +26,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "build.h" #include "compat.h" #include "SmackerDecoder.h" -#include "fx_man.h" #include "common_game.h" #include "blood.h" #include "config.h" @@ -36,6 +35,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "screen.h" #include "sound.h" #include "view.h" +#include "sound/s_soundinternal.h" BEGIN_BLD_NS @@ -282,7 +282,7 @@ void credPlaySmk(const char *_pzSMK, const char *_pzWAV, int nWav) Smacker_Close(hSMK); ctrlClearAllInput(); - FX_StopAllSounds_(); + soundEngine->StopAllChannels(); videoSetPalette(0, 0, 8+2); tileDelete(kSMKTile); Bfree(pzSMK_); diff --git a/source/blood/src/endgame.cpp b/source/blood/src/endgame.cpp index 958d6d17b..c26b7da34 100644 --- a/source/blood/src/endgame.cpp +++ b/source/blood/src/endgame.cpp @@ -26,7 +26,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "build.h" #include "common.h" #include "mmulti.h" -#include "fx_man.h" #include "common_game.h" #include "blood.h" #include "endgame.h" @@ -42,6 +41,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "statistics.h" #include "gamemenu.h" #include "gstrings.h" +#include "sound/s_soundinternal.h" BEGIN_BLD_NS @@ -119,8 +119,7 @@ void CEndGameMgr::Finish(void) { levelSetupOptions(gGameOptions.nEpisode, gNextLevel); gInitialNetPlayers = numplayers; - FX_StopAllSounds_(); - sndKillAllSounds(); + soundEngine->StopAllChannels(); gStartNewGame = 1; gInputMode = (INPUT_MODE)at1; at0 = 0; diff --git a/source/blood/src/sfx.cpp b/source/blood/src/sfx.cpp index 21eb4bb69..52e8cecdc 100644 --- a/source/blood/src/sfx.cpp +++ b/source/blood/src/sfx.cpp @@ -26,7 +26,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "build.h" #include "compat.h" #include "common_game.h" -#include "fx_man.h" #include "config.h" #include "gameutil.h" diff --git a/source/blood/src/sound.cpp b/source/blood/src/sound.cpp index c5a07d1f1..0e7b6e10c 100644 --- a/source/blood/src/sound.cpp +++ b/source/blood/src/sound.cpp @@ -25,7 +25,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "build.h" #include "compat.h" #include "music.h" -#include "fx_man.h" #include "common_game.h" #include "config.h" #include "levels.h" diff --git a/source/common/gamecvars.cpp b/source/common/gamecvars.cpp index 2e2892ee9..acc4deb61 100644 --- a/source/common/gamecvars.cpp +++ b/source/common/gamecvars.cpp @@ -36,7 +36,6 @@ #include "c_cvars.h" #include "common.h" -#include "fx_man.h" #include "baselayer.h" #include "gameconfigfile.h" #include "gamecontrol.h" @@ -138,11 +137,6 @@ CVARD(Bool, snd_doppler, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "enable/disable CVARD(Bool, mus_restartonload, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "restart the music when loading a saved game with the same map or not") // only implemented for Blood - todo: generalize CVARD(Bool, mus_redbook, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_FRONTEND_BLOOD, "enables/disables redbook audio (Blood only!)") // only Blood has assets for this. -CUSTOM_CVARD(Bool, snd_reversestereo, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOINITCALL, "reverses the stereo channels") -{ - FX_SetReverseStereo(self); -} - CUSTOM_CVARD(Int, snd_fxvolume, 255, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "controls volume for sound effects") { if (self < 0) self = 0; diff --git a/source/common/gamecvars.h b/source/common/gamecvars.h index 45463e313..d998bf466 100644 --- a/source/common/gamecvars.h +++ b/source/common/gamecvars.h @@ -40,7 +40,6 @@ EXTERN_CVAR(Bool, snd_doppler) EXTERN_CVAR(Bool, mus_enabled) EXTERN_CVAR(Bool, mus_restartonload) EXTERN_CVAR(Bool, mus_redbook) -EXTERN_CVAR(Bool, snd_reversestereo) EXTERN_CVAR(Int, snd_fxvolume) EXTERN_CVAR(Int, snd_mixrate) EXTERN_CVAR(Int, snd_numchannels) diff --git a/source/common/menu/menu.cpp b/source/common/menu/menu.cpp index 321f30bdf..c81dcee7a 100644 --- a/source/common/menu/menu.cpp +++ b/source/common/menu/menu.cpp @@ -48,12 +48,12 @@ #include "printf.h" #include "v_draw.h" #include "gamecontrol.h" -#include "fx_man.h" #include "pragmas.h" #include "build.h" #include "baselayer.h" #include "statistics.h" #include "input/m_joy.h" +#include "sound/s_soundinternal.h" void RegisterDukeMenus(); void RegisterRedneckMenus(); @@ -366,7 +366,7 @@ void M_StartControlPanel (bool makeSound) created = true; M_CreateMenus(); } - FX_StopAllSounds_(); + soundEngine->StopAllChannels(); gi->MenuOpened(); if (makeSound) gi->MenuSound(ActivateSound); diff --git a/source/sw/src/anim.cpp b/source/sw/src/anim.cpp index 472318016..ef19588c6 100644 --- a/source/sw/src/anim.cpp +++ b/source/sw/src/anim.cpp @@ -30,7 +30,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "keys.h" #include "mytypes.h" -#include "fx_man.h" #include "music.h" #include "gamedefs.h" diff --git a/source/sw/src/config.cpp b/source/sw/src/config.cpp index db5f9d82a..740c54c6e 100644 --- a/source/sw/src/config.cpp +++ b/source/sw/src/config.cpp @@ -34,7 +34,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "mytypes.h" #include "gamedefs.h" #include "gamecontrol.h" -#include "fx_man.h" #include "sounds.h" #include "config.h" #include "common_game.h" diff --git a/source/sw/src/d_menu.cpp b/source/sw/src/d_menu.cpp index 79834fc65..80b2c9ce2 100644 --- a/source/sw/src/d_menu.cpp +++ b/source/sw/src/d_menu.cpp @@ -43,7 +43,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "gamedefs.h" #include "config.h" #include "network.h" -#include "fx_man.h" #include "music.h" #include "text.h" #include "version.h" @@ -247,12 +246,11 @@ void GameInterface::StartGame(FGameStartup& gs) else if (Skill == 3) PlaySound(DIGI_NOPAIN, v3df_none, CHAN_VOICE); - if (handle > FX_Ok) - while (soundEngine->IsSourcePlayingSomething(SOURCE_None, nullptr, CHAN_VOICE)) - { - DoUpdateSounds(); - handleevents(); - } + while (soundEngine->IsSourcePlayingSomething(SOURCE_None, nullptr, CHAN_VOICE)) + { + DoUpdateSounds(); + handleevents(); + } } FSavegameInfo GameInterface::GetSaveSig() diff --git a/source/sw/src/game.cpp b/source/sw/src/game.cpp index 90c341a5c..4068507d3 100644 --- a/source/sw/src/game.cpp +++ b/source/sw/src/game.cpp @@ -60,7 +60,6 @@ Things required to make savegames work: #include "lists.h" #include "network.h" #include "pal.h" -#include "fx_man.h" #include "input.h" #include "mytypes.h" @@ -1392,7 +1391,6 @@ void NewLevel(void) { if (DemoPlaying) { - FX_SetVolume(0); // Shut the hell up while game is loading! InitLevel(); InitRunLevel(); @@ -1415,7 +1413,6 @@ void NewLevel(void) } else { - FX_SetVolume(0); // Shut the hell up while game is loading! InitLevel(); RunLevel(); STAT_Update(false); @@ -2743,9 +2740,6 @@ void InitRunLevel(void) SetRedrawScreen(Player + myconnectindex); - snd_reversestereo.Callback(); - snd_fxvolume.Callback(); - FX_SetVolume(snd_fxvolume); // Turn volume back up if (snd_ambience) StartAmbientSound(); } @@ -2757,8 +2751,6 @@ void RunLevel(void) int i; InitRunLevel(); - FX_SetVolume(snd_fxvolume); - #if 0 waitforeverybody(); #endif diff --git a/source/sw/src/menus.cpp b/source/sw/src/menus.cpp index bdc4e160f..eb1c71ec0 100644 --- a/source/sw/src/menus.cpp +++ b/source/sw/src/menus.cpp @@ -49,7 +49,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "gamedefs.h" #include "config.h" #include "network.h" -#include "fx_man.h" #include "music.h" #include "text.h" #include "version.h" diff --git a/source/sw/src/miscactr.cpp b/source/sw/src/miscactr.cpp index 016e4715d..0e1e22535 100644 --- a/source/sw/src/miscactr.cpp +++ b/source/sw/src/miscactr.cpp @@ -34,7 +34,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "tags.h" #include "ai.h" #include "quake.h" -#include "fx_man.h" #include "actor.h" #include "sector.h" #include "sprite.h" diff --git a/source/sw/src/panel.cpp b/source/sw/src/panel.cpp index 699f7f553..cb1d31e6c 100644 --- a/source/sw/src/panel.cpp +++ b/source/sw/src/panel.cpp @@ -43,7 +43,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "player.h" #include "weapon.h" -#include "fx_man.h" #include "menu/menu.h" #include "swcvar.h" #include "sound/s_soundinternal.h" diff --git a/source/sw/src/player.cpp b/source/sw/src/player.cpp index d4d881632..bb05c60da 100644 --- a/source/sw/src/player.cpp +++ b/source/sw/src/player.cpp @@ -50,7 +50,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "pal.h" #include "demo.h" #include "mclip.h" -#include "fx_man.h" #include "sprite.h" #include "weapon.h" diff --git a/source/sw/src/ripper2.cpp b/source/sw/src/ripper2.cpp index 11699f604..3a139c67a 100644 --- a/source/sw/src/ripper2.cpp +++ b/source/sw/src/ripper2.cpp @@ -36,7 +36,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "actor.h" #include "sprite.h" #include "track.h" -#include "fx_man.h" BEGIN_SW_NS diff --git a/source/sw/src/save.cpp b/source/sw/src/save.cpp index b59811e6c..830ea5463 100644 --- a/source/sw/src/save.cpp +++ b/source/sw/src/save.cpp @@ -48,7 +48,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms //#define FILE_TYPE 1 #include "mfile.h" -#include "fx_man.h" #include "music.h" #include "weapon.h" @@ -1223,7 +1222,6 @@ bool GameInterface::LoadGame(FSaveGameNode* sv) MUS_ResumeSaved(); if (snd_ambience) StartAmbientSound(); - FX_SetVolume(snd_fxvolume); TRAVERSE_CONNECT(i) { diff --git a/source/sw/src/setup.cpp b/source/sw/src/setup.cpp index d28ce3af5..824c57412 100644 --- a/source/sw/src/setup.cpp +++ b/source/sw/src/setup.cpp @@ -30,7 +30,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "game.h" #include "mytypes.h" -#include "fx_man.h" #include "music.h" #include "gamedefs.h" diff --git a/source/sw/src/sounds.cpp b/source/sw/src/sounds.cpp index f91a2c627..ebb5afed0 100644 --- a/source/sw/src/sounds.cpp +++ b/source/sw/src/sounds.cpp @@ -32,7 +32,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "names2.h" #include "mytypes.h" -#include "fx_man.h" #include "music.h" #include "al_midi.h" #include "gamedefs.h" diff --git a/source/sw/src/swconfig.cpp b/source/sw/src/swconfig.cpp index c01bf1862..b182c99d8 100644 --- a/source/sw/src/swconfig.cpp +++ b/source/sw/src/swconfig.cpp @@ -33,7 +33,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms //#include "settings.h" #include "mytypes.h" -#include "fx_man.h" #include "gamedefs.h" #include "common_game.h" #include "config.h" diff --git a/source/sw/src/zilla.cpp b/source/sw/src/zilla.cpp index 4c628e752..17879bd98 100644 --- a/source/sw/src/zilla.cpp +++ b/source/sw/src/zilla.cpp @@ -35,7 +35,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "quake.h" #include "actor.h" #include "track.h" -#include "fx_man.h" #include "gamecontrol.h" #include "mapinfo.h" diff --git a/wadsrc/static/demolition/menudef.txt b/wadsrc/static/demolition/menudef.txt index b444f2d09..a8cc90861 100644 --- a/wadsrc/static/demolition/menudef.txt +++ b/wadsrc/static/demolition/menudef.txt @@ -1327,7 +1327,6 @@ OptionMenu AdvSoundOptions //protected Title "$ADVSNDMNU_TITLE" Option "$ADVSNDMNU_SAMPLERATE", "snd_mixrate", "SampleRates" //Option "$ADVSNDMNU_HRTF", "snd_hrtf", "AutoOffOn" - Option "$ADVSNDMNU_FLIPSTEREO", "snd_reversestereo", "OnOff" StaticText " " //Option "$SNDMNU_BACKGROUND", "i_soundinbackground", "OnOff" //StaticText " "