issue #781: implement audio functions on win32

This commit is contained in:
minggo 2011-11-25 14:27:30 +08:00
parent 89dbfee129
commit 59f2ce10f2
1 changed files with 25 additions and 0 deletions

View File

@ -170,22 +170,47 @@ void SimpleAudioEngine::preloadEffect(const char* pszFilePath)
void SimpleAudioEngine::pauseEffect(unsigned int nSoundId)
{
EffectList::iterator p = sharedList().find(nSoundId);
if (p != sharedList().end())
{
p->second->Pause();
}
}
void SimpleAudioEngine::pauseAllEffects()
{
EffectList::iterator iter;
for (iter = sharedList().begin(); iter != sharedList().end(); iter++)
{
iter->second->Pause();
}
}
void SimpleAudioEngine::resumeEffect(unsigned int nSoundId)
{
EffectList::iterator p = sharedList().find(nSoundId);
if (p != sharedList().end())
{
p->second->Resume();
}
}
void SimpleAudioEngine::resumeAllEffects()
{
EffectList::iterator iter;
for (iter = sharedList().begin(); iter != sharedList().end(); iter++)
{
iter->second->Resume();
}
}
void SimpleAudioEngine::stopAllEffects()
{
EffectList::iterator iter;
for (iter = sharedList().begin(); iter != sharedList().end(); iter++)
{
iter->second->Stop();
}
}
void SimpleAudioEngine::preloadBackgroundMusic(const char* pszFilePath)