From 18fe6a8ae70fbcb0ffe71b899966789f220c2b98 Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Tue, 12 Sep 2023 14:04:30 +0400 Subject: [PATCH] Remove default argument --- apps/openmw/mwbase/soundmanager.hpp | 4 +--- apps/openmw/mwlua/musicbindings.cpp | 3 ++- apps/openmw/mwscript/soundextensions.cpp | 2 +- apps/openmw/mwsound/soundmanagerimp.hpp | 3 +-- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/apps/openmw/mwbase/soundmanager.hpp b/apps/openmw/mwbase/soundmanager.hpp index bf19255e6f..85062ace8d 100644 --- a/apps/openmw/mwbase/soundmanager.hpp +++ b/apps/openmw/mwbase/soundmanager.hpp @@ -112,9 +112,7 @@ namespace MWBase virtual void stopMusic() = 0; ///< Stops music if it's playing - virtual void streamMusic( - const std::string& filename, MWSound::MusicType type = MWSound::MusicType::Scripted, float fade = 1.f) - = 0; + virtual void streamMusic(const std::string& filename, MWSound::MusicType type, float fade = 1.f) = 0; ///< Play a soundifle /// \param filename name of a sound file in the data directory. /// \param type music type. diff --git a/apps/openmw/mwlua/musicbindings.cpp b/apps/openmw/mwlua/musicbindings.cpp index f319070c06..919e8b0590 100644 --- a/apps/openmw/mwlua/musicbindings.cpp +++ b/apps/openmw/mwlua/musicbindings.cpp @@ -14,7 +14,8 @@ namespace MWLua { sol::table api(context.mLua->sol(), sol::create); api["streamMusic"] = [](std::string_view fileName) { - MWBase::Environment::get().getSoundManager()->streamMusic(std::string(fileName)); + MWBase::SoundManager* sndMgr = MWBase::Environment::get().getSoundManager(); + sndMgr->streamMusic(std::string(fileName), MWSound::MusicType::Scripted); }; api["stopMusic"] = []() { MWBase::Environment::get().getSoundManager()->stopMusic(); }; diff --git a/apps/openmw/mwscript/soundextensions.cpp b/apps/openmw/mwscript/soundextensions.cpp index 3d982c8eab..44cdc25064 100644 --- a/apps/openmw/mwscript/soundextensions.cpp +++ b/apps/openmw/mwscript/soundextensions.cpp @@ -67,7 +67,7 @@ namespace MWScript runtime.pop(); MWBase::Environment::get().getSoundManager()->streamMusic( - Misc::ResourceHelpers::correctMusicPath(music)); + Misc::ResourceHelpers::correctMusicPath(music), MWSound::MusicType::Scripted); } }; diff --git a/apps/openmw/mwsound/soundmanagerimp.hpp b/apps/openmw/mwsound/soundmanagerimp.hpp index a8eb37f55b..87fb109791 100644 --- a/apps/openmw/mwsound/soundmanagerimp.hpp +++ b/apps/openmw/mwsound/soundmanagerimp.hpp @@ -176,8 +176,7 @@ namespace MWSound void stopMusic() override; ///< Stops music if it's playing - void streamMusic(const std::string& filename, MWSound::MusicType type = MWSound::MusicType::Scripted, - float fade = 1.f) override; + void streamMusic(const std::string& filename, MWSound::MusicType type, float fade = 1.f) override; ///< Play a soundifle /// \param filename name of a sound file in the data directory. /// \param type music type.