mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-20 01:39:40 +00:00
Corrected setPlaylist and added stopMusic
This commit is contained in:
parent
44620ada86
commit
a309ef7b55
2 changed files with 15 additions and 1 deletions
|
@ -266,6 +266,13 @@ namespace MWSound
|
|||
}
|
||||
}
|
||||
|
||||
void SoundManager::stopMusic()
|
||||
{
|
||||
if (music)
|
||||
music->stop();
|
||||
setPlaylist();
|
||||
}
|
||||
|
||||
|
||||
void SoundManager::streamMusicFull(const std::string& filename)
|
||||
{
|
||||
|
@ -327,7 +334,11 @@ namespace MWSound
|
|||
{
|
||||
const Files::PathContainer* previousPlaylist;
|
||||
previousPlaylist = mCurrentPlaylist;
|
||||
if(mMusicLibrary.containsSection(playlist, mFSStrict))
|
||||
if (playlist == "")
|
||||
{
|
||||
mCurrentPlaylist = mMusicLibrary.section(playlist, mFSStrict);
|
||||
}
|
||||
else if(mMusicLibrary.containsSection(playlist, mFSStrict))
|
||||
{
|
||||
mCurrentPlaylist = mMusicLibrary.section(playlist, mFSStrict);
|
||||
}
|
||||
|
|
|
@ -99,6 +99,9 @@ namespace MWSound
|
|||
MWWorld::Environment& environment);
|
||||
~SoundManager();
|
||||
|
||||
void stopMusic();
|
||||
///< Stops music if it's playing
|
||||
|
||||
void streamMusic(const std::string& filename);
|
||||
///< Play a soundifle
|
||||
/// \param filename name of a sound file in "Music/" in the data directory.
|
||||
|
|
Loading…
Reference in a new issue