mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 06:35:30 +00:00
Corrected setPlaylist and added stopMusic
This commit is contained in:
parent
44620ada86
commit
a309ef7b55
@ -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…
x
Reference in New Issue
Block a user