Closed asnagni closed 5 months ago
The engine supports OGG, MP3 and WAV formats.
Any plan to support m4a file format? I think it's the default on Android. It was supported on Cocos2d-x maybe we can just port over what is there? What do you think?
It was supported on Cocos2d-x maybe we can just port over what is there?
Are you certain that Cocos2d-x supported M4A files? Which version of Cocos2d-x?
If you can find the implementation, then consider porting it over to Axmol.
Also, you don't need to use the built-in audio support if there are features you require that do not exist in the Axmol implementation. You could always use other audio libraries, such as FMOD, which other developers have linked to their Axmol apps successfully.
Yes coco2d-x does supportm4a audio file format since a long time. I think from 3.6.x . Since we were on 3.17.2 before migrating I can ensure you that it does.
Ok that works with FMOD or we may just change the format. Thank you for the advice 👍, I do appreciate. But I still think it would be nice if we could port what exist already in cocos2d-x. That way we make sure to have more compare to cocos2d-x not less.
Thank you again, Stay safe.
But I still think it would be nice if we could port what exist already in cocos2d-x.
If you can find the implementation, then point out where it is, because looking through the Cocos2d-x code I cannot see any references to M4A, and even in the Cocos2d-x v3 and v4 cpp-tests project I can only see tests for OGG, WAV and MP3.
Also, in the Cocos v4 documentation, there is no mention of M4A for Android or Windows: https://docs.cocos2d-x.org/cocos2d-x/v4/en/audio/getting_started.html
The safest compressed formats to use that are supported on all platforms in Axmol would probably be OGG or MP3.
Strange, because we have it working. Let me check what was done and I will come back to you.
Thank you again
Hi rh101, After investigating the legacy code, I can say that you are right. Ccos2d-x doesn't support that audio format. What was done it was to integrate and use ExoPlayer to support more audio format.
Thank you for your support, I do appreciate. Stay safe
Not an issue
Hello, On Android platform when we try to preload m4a audio files, the operation will fail. We are not sure if the m4a is not supported yet by Axmol. Maybe we need to setup a flag in the project CMake file? We are not sure at this point.
When the app is running, the files are located in a folder named "voiceMesages" in the app writable path.
axmol version: development branch
devices test on: Redmi Note 8 & 9, Google Pixel 8, Samsung Galaxy S24, Samsung Galaxy A73 (Android 11, 13 and 14)
developing environments
Thank you for your help, Stay safe