Remove an unneeded method

This commit is contained in:
Chris Robinson 2015-11-23 04:10:56 -08:00
parent 3fdc3c4ea9
commit febc7b510a
2 changed files with 11 additions and 17 deletions

View file

@ -412,21 +412,6 @@ namespace MWSound
} }
bool SoundManager::isPlaying(const MWWorld::Ptr &ptr, const std::string &id) const
{
SoundMap::const_iterator snditer = mActiveSounds.find(ptr);
if(snditer != mActiveSounds.end())
{
SoundNamePairList::const_iterator sndname = snditer->second.begin();
for(;sndname != snditer->second.end();++sndname)
{
if(sndname->second == id && sndname->first->isPlaying())
return true;
}
}
return false;
}
MWBase::SoundPtr SoundManager::playSound(const std::string& soundId, float volume, float pitch, PlayType type, PlayMode mode, float offset) MWBase::SoundPtr SoundManager::playSound(const std::string& soundId, float volume, float pitch, PlayType type, PlayMode mode, float offset)
{ {
MWBase::SoundPtr sound; MWBase::SoundPtr sound;
@ -626,7 +611,17 @@ namespace MWSound
bool SoundManager::getSoundPlaying(const MWWorld::Ptr &ptr, const std::string& soundId) const bool SoundManager::getSoundPlaying(const MWWorld::Ptr &ptr, const std::string& soundId) const
{ {
return isPlaying(ptr, soundId); SoundMap::const_iterator snditer = mActiveSounds.find(ptr);
if(snditer != mActiveSounds.end())
{
SoundNamePairList::const_iterator sndname = snditer->second.begin();
for(;sndname != snditer->second.end();++sndname)
{
if(sndname->second == soundId && sndname->first->isPlaying())
return true;
}
}
return false;
} }

View file

@ -74,7 +74,6 @@ namespace MWSound
const Sound_Buffer *lookupVoice(const std::string &voicefile); const Sound_Buffer *lookupVoice(const std::string &voicefile);
void streamMusicFull(const std::string& filename); void streamMusicFull(const std::string& filename);
bool isPlaying(const MWWorld::Ptr &ptr, const std::string &id) const;
void updateSounds(float duration); void updateSounds(float duration);
void updateRegionSound(float duration); void updateRegionSound(float duration);