Tag Info

New answers tagged


You've already identified the main difference: PlayOneShot can play multiple sounds without cutting each other off. On the flipside however that means* you can't stop the audio clip either; it'll just play all the way through, with no way to stop it early. *I think; I can't test this at the moment, but I recall that calling Stop() after PlayOneShot() does ...


This is what I ended up doing: #include "audio/include/AudioEngine.h" using namespace cocos2d::experimental; [...] _musicVol = 5; _backgroundAudioProfile = AudioEngine::INVAILD_AUDIO_ID; if (_backgroundAudioProfile == AudioEngine::INVAILD_AUDIO_ID) { _backgroundAudioProfile = AudioEngine::play2d("background.mp3", true, _musicVol); } ...

Top 50 recent answers are included