mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 06:53:53 +00:00
Fix streamMusic's path lookup
This commit is contained in:
parent
fc27d5cc19
commit
e48745b68e
2 changed files with 8 additions and 2 deletions
|
@ -155,7 +155,7 @@ namespace MWSound
|
|||
mMusic.reset();
|
||||
}
|
||||
|
||||
void SoundManager::streamMusic(const std::string& filename)
|
||||
void SoundManager::streamMusicFull(const std::string& filename)
|
||||
{
|
||||
std::cout <<"Playing "<<filename<< std::endl;
|
||||
try
|
||||
|
@ -170,6 +170,11 @@ namespace MWSound
|
|||
}
|
||||
}
|
||||
|
||||
void SoundManager::streamMusic(const std::string& filename)
|
||||
{
|
||||
streamMusicFull("Music/"+filename);
|
||||
}
|
||||
|
||||
void SoundManager::startRandomTitle()
|
||||
{
|
||||
Ogre::StringVectorPtr filelist;
|
||||
|
@ -179,7 +184,7 @@ namespace MWSound
|
|||
return;
|
||||
|
||||
int i = rand()%filelist->size();
|
||||
streamMusic((*filelist)[i]);
|
||||
streamMusicFull((*filelist)[i]);
|
||||
}
|
||||
|
||||
bool SoundManager::isMusicPlaying()
|
||||
|
|
|
@ -58,6 +58,7 @@ namespace MWSound
|
|||
MWWorld::Ptr ptr, const std::string &id,
|
||||
float volume, float pitch, float min, float max,
|
||||
bool loop, bool untracked=false);
|
||||
void streamMusicFull(const std::string& filename);
|
||||
bool isPlaying(MWWorld::Ptr ptr, const std::string &id) const;
|
||||
void updateRegionSound(float duration);
|
||||
|
||||
|
|
Loading…
Reference in a new issue