diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 752e76570..61d179dd8 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -838,9 +838,14 @@ set (PCH_SOURCES common/textures/formats/tgatexture.cpp common/textures/formats/stbtexture.cpp common/textures/formats/arttexture.cpp - + common/music/music.cpp - + common/music/i_music.cpp + common/music/i_soundfont.cpp + common/music/music_config.cpp + common/music/music_midi_base.cpp + + ) if( MSVC ) diff --git a/source/common/music/i_music.cpp b/source/common/music/i_music.cpp index 1d0b05b9a..8dc8526af 100644 --- a/source/common/music/i_music.cpp +++ b/source/common/music/i_music.cpp @@ -40,22 +40,20 @@ #include #include "m_argv.h" -#include "w_wad.h" +#include "filesystrem.h" #include "c_dispatch.h" #include "templates.h" #include "stats.h" #include "c_cvars.h" #include "c_console.h" -#include "vm.h" #include "v_text.h" -#include "i_sound.h" #include "i_soundfont.h" #include "s_music.h" -#include "doomstat.h" +#include "printf.h" #include "zmusic/zmusic.h" #include "streamsources/streamsource.h" #include "filereadermusicinterface.h" -#include "../libraries/zmusic/midisources/midisource.h" +#include "midisources/midisource.h" @@ -119,11 +117,13 @@ CUSTOM_CVARD(Int, mus_volume, 255, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "controls mus else { // Set general music volume. - ChangeMusicSetting(ZMusic::mus_volume, nullptr, self / 255.f); + ChangeMusicSetting(ZMusic::snd_musicvolume, nullptr, self / 255.f); + /* todo: Alter the active music stream's volume if (GSnd != nullptr) { - GSnd->SetMusicVolume(clamp(self * relative_volume * snd_mastervolume, 0, 1)); + GSnd->SetMusicVolume(clamp(self * relative_volume, 0, 1)); } + */ // For music not implemented through the digital sound system, // let them know about the change. if (mus_playing.handle != nullptr) diff --git a/source/common/music/i_soundfont.cpp b/source/common/music/i_soundfont.cpp index 7e634e793..6fa098b71 100644 --- a/source/common/music/i_soundfont.cpp +++ b/source/common/music/i_soundfont.cpp @@ -36,7 +36,6 @@ #include #include "i_soundfont.h" #include "cmdlib.h" -#include "i_system.h" #include "gameconfigfile.h" #include "filereadermusicinterface.h" #include "zmusic/zmusic.h"