mirror of https://github.com/axmolengine/axmol.git
issue #781: implement audio functions on win32
This commit is contained in:
parent
89dbfee129
commit
59f2ce10f2
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue