1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 10:53:53 +00:00

Fix streamMusic's path lookup

This commit is contained in:
Chris Robinson 2012-03-20 12:39:49 -07:00
parent fc27d5cc19
commit e48745b68e
2 changed files with 8 additions and 2 deletions

View file

@ -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()

View file

@ -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);