mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-30 19:45:40 +00:00
Remove default argument
This commit is contained in:
parent
e1cae5a029
commit
18fe6a8ae7
4 changed files with 5 additions and 7 deletions
|
@ -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.
|
||||
|
|
|
@ -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(); };
|
||||
|
|
|
@ -67,7 +67,7 @@ namespace MWScript
|
|||
runtime.pop();
|
||||
|
||||
MWBase::Environment::get().getSoundManager()->streamMusic(
|
||||
Misc::ResourceHelpers::correctMusicPath(music));
|
||||
Misc::ResourceHelpers::correctMusicPath(music), MWSound::MusicType::Scripted);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue