void SimpleAudioEngine::end()
{
    sharedAudioController()->StopBackgroundMusic(true);
    sharedAudioController()->StopAllSoundEffects(true);
    sharedAudioController()->ReleaseResources();
    s_initialized = false;
}
Esempio n. 2
0
void SimpleAudioEngine::end()
{
    // 停止音乐播放并回收资源
    sharedAudioController()->StopBackgroundMusic(true);
    sharedAudioController()->StopAllSoundEffects();
    sharedAudioController()->ReleaseResources();
}
Esempio n. 3
0
void SimpleAudioEngine::end()
{
    sharedAudioController()->StopBackgroundMusic(true);
    sharedAudioController()->StopAllSoundEffects();
    sharedAudioController()->ReleaseResources();
	//set here to tell the s_bAudioControllerNeedReInitialize should be re-initialized
	s_bAudioControllerNeedReInitialize = true;
}
Esempio n. 4
0
unsigned int SimpleAudioEngine::playEffect(const char* pszFilePath, bool bLoop)
{
    unsigned int sound;
    sharedAudioController()->PlaySoundEffect(pszFilePath, bLoop, sound);

    return sound;
}
unsigned int SimpleAudioEngine::playEffect(const char* pszFilePath, bool bLoop,float pitch, float pan, float gain)
{
    unsigned int sound;
    sharedAudioController()->PlaySoundEffect(pszFilePath, bLoop, sound);
    // TODO: need to support playEffect parameters
    return sound;
}
unsigned int SimpleAudioEngine::playEffect(const char* pszFilePath, bool bLoop,float pitch, float pan, float gain)
{
    unsigned int sound;
    string fullPath = CCFileUtils::getInstance()->fullPathForFilename(pszFilePath);
    sharedAudioController()->PlaySoundEffect(fullPath.c_str(), bLoop, sound);    // TODO: need to support playEffect parameters
    return sound;
}
Esempio n. 7
0
unsigned int SimpleAudioEngine::playEffect(const char* pszFilePath, bool bLoop)
{
    unsigned int sound;
    string fullPath = CCFileUtils::sharedFileUtils()->fullPathForFilename(pszFilePath);
    sharedAudioController()->PlaySoundEffect(fullPath.c_str(), bLoop, sound);

    return sound;
}
Esempio n. 8
0
void SimpleAudioEngine::playBackgroundMusic(const char* pszFilePath, bool bLoop)
{
    if (! pszFilePath)
    {
        return;
    }

    sharedAudioController()->PlayBackgroundMusic(pszFilePath, bLoop);
}
Esempio n. 9
0
void SimpleAudioEngine::playBackgroundMusic(const char* pszFilePath, bool bLoop)
{
    if (! pszFilePath)
    {
        return;
    }

    string fullPath = CCFileUtils::sharedFileUtils()->fullPathForFilename(pszFilePath);
    sharedAudioController()->PlayBackgroundMusic(fullPath.c_str(), bLoop);
}
Esempio n. 10
0
void SimpleAudioEngine::unloadEffect(const char* pszFilePath)
{
    string fullPath = CCFileUtils::sharedFileUtils()->fullPathForFilename(pszFilePath);
    sharedAudioController()->UnloadSoundEffect(fullPath.c_str());
}
Esempio n. 11
0
float SimpleAudioEngine::getBackgroundMusicVolume()
{
    return sharedAudioController()->GetBackgroundVolume();
}
Esempio n. 12
0
void SimpleAudioEngine::resumeAllEffects()
{
    sharedAudioController()->ResumeAllSoundEffects();
}
Esempio n. 13
0
void SimpleAudioEngine::stopAllEffects()
{
    sharedAudioController()->StopAllSoundEffects();
}
Esempio n. 14
0
void SimpleAudioEngine::render()
{
    sharedAudioController()->Render();
}
Esempio n. 15
0
void SimpleAudioEngine::unloadEffect(const char* pszFilePath)
{
    sharedAudioController()->UnloadSoundEffect(pszFilePath);
}
Esempio n. 16
0
void SimpleAudioEngine::stopEffect(unsigned int nSoundId)
{
    sharedAudioController()->StopSoundEffect(nSoundId);
}
Esempio n. 17
0
void SimpleAudioEngine::setEffectsVolume(float volume)
{
    sharedAudioController()->SetSoundEffectVolume((volume<=0.0f)? 0.0f : volume);
}
Esempio n. 18
0
bool SimpleAudioEngine::isBackgroundMusicPlaying()
{
    return sharedAudioController()->IsBackgroundMusicPlaying();
}
void SimpleAudioEngine::setEffectPitch(unsigned int nSoundId, float pitch)
{
    sharedAudioController()->setEffectPitch(nSoundId, pitch);
}
Esempio n. 20
0
void SimpleAudioEngine::rewindBackgroundMusic()
{
    sharedAudioController()->RewindBackgroundMusic();
}
Esempio n. 21
0
void SimpleAudioEngine::pauseBackgroundMusic()
{
    sharedAudioController()->PauseBackgroundMusic();
}
Esempio n. 22
0
void SimpleAudioEngine::stopBackgroundMusic(bool bReleaseData)
{
    sharedAudioController()->StopBackgroundMusic(bReleaseData);
}
Esempio n. 23
0
void SimpleAudioEngine::setBackgroundMusicVolume(float volume)
{
	sharedAudioController()->SetBackgroundVolume((volume<=0.0f)? 0.0f : volume);
}
Esempio n. 24
0
void SimpleAudioEngine::pauseEffect(unsigned int nSoundId)
{
    sharedAudioController()->PauseSoundEffect(nSoundId);
}
Esempio n. 25
0
float SimpleAudioEngine::getEffectsVolume()
{
    return sharedAudioController()->GetSoundEffectVolume();
}
Esempio n. 26
0
void SimpleAudioEngine::resumeEffect(unsigned int nSoundId)
{
    sharedAudioController()->ResumeSoundEffect(nSoundId);
}
void SimpleAudioEngine::setEffectVolume(unsigned int nSoundId, float volume)
{
    sharedAudioController()->setEffectVolume(nSoundId, volume);
}
Esempio n. 28
0
void SimpleAudioEngine::pauseAllEffects()
{
    sharedAudioController()->PauseAllSoundEffects();
}
unsigned int SimpleAudioEngine::playEffect(const char* pszFilePath, bool bLoop,float pitch, float pan, float gain)
{
    return sharedAudioController()->playSoundEffect(pszFilePath, bLoop, pitch, pan, gain);
}
void SimpleAudioEngine::preloadEffect(const char* pszFilePath)
{
    string fullPath = CCFileUtils::getInstance()->fullPathForFilename(pszFilePath);
    sharedAudioController()->PreloadSoundEffect(fullPath.c_str());
}