CocosDenshion::SimpleAudioEngine vs cocos2d::experimental::AudioEngine

CocosDenshion::SimpleAudioEngine vs cocos2d::experimental::AudioEngine
0
#1

Hey guys, I see two ways to play sound/music, which one should I use for 3.17 C++?

AudioEngine vs SimpleAudioEngine, What are the differences?
#2

I recommend to use AudioEngine.
Maybe SimpleAudioEngine is more ‘simple’ to use, but i had lag problems in Android using SimpleAudioEngine, so, i recommend AudioEngine always.

#3

First of all Thank you! Is it stable since it’s mark as experimental?

#4

It does seem to be stable, and a lot of updates have gone into it to fix different problems over the past 2 years. It is the recommended one to use, so perhaps it needs to be moved out of the experimental namespace.

#5

Thank you! I see SimpleAudioEngine have playBackgroundMusic but missing from AudioEngine. So AudioEngine is playing music is with loop set to true? Or maybe I might be missing something?

#6

Just call AudioEngine::play2d for everything. The comments in the AudioEngine.h are very helpful, so check there for how to use it.

1 Like
#7

AudioEngine is stable and threaded and there is more functionality than SimpleAudioEngine. I had started documenting this and never made it back to it. I’ll get it back on my list.

#8

Please don’t get me wrong and it’s great you are working on the docs. I feel the cocos2d-x lack docs, maybe the lack of resources or just the api moving fast and docs can’t keep up.

#9

@slackmoehrle should not we than remove SimpleAudioEngine from cocos2d-x code?

#10

I agree if AudioEngine is stable as claimed why not deprecate/remove SimpleAudioEngine to make it more simple for new users.

#11

If you are test your game in windows platform AudioEngine is very laggy.
SimpleAudioEngine works in windows without any lag. We use simple version just for test in windows platform.

#12

I think that SimpleAudioEngine has a place. For simple solutions it is less overhead and more time tested on all platforms.

1 Like
#14

does the experimental::AudioEngine have similar support for effects and music? as far as i know the simple audio engine can preload effects but stream music, I wonder such a streaming Music support is available for the experimental::AudioEngine, because so far I could only find the play2d with preload and uncache support.