Open dumganhar opened 8 years ago
@dumganhar i think you can refer to EditBox, please use the same rule as others.
Good point. :)
I think the original design: AudioDecoderManager + AudioDecoder
is good for multi-platforms diff implement to decode mp3,ogg,etc..
@dumganhar By the way, the previously implement of Audio Engine doesn't support .ogg at Apple platforms, If you Refactor the audio engine, you can think to simply import vorbis libs to Apple xcode project.
Currently, new AudioEngine uses the following technique:
OpenAL
too.Except Android and Tizen, other platforms could all use OpenAL. But now, we have separated folder for platforms using OpenAL, the bad thing is although they all use OpenAL , the source code are so different. :(
Perhaps, we need to encapsule this and only need
cocos/audio/openal
for these platforms that use OpenAL. In this way, it will be better for maintaining and better for adding new features.Some folder structure may be like this:
Why Should We Need Specific?
Although they all use OpenAL to play sound, they should use platform dependence code to decode compressed file (.mp3/.ogg/.caf) into pcm buffer.
Any idea? @ricardoquesada @minggo .