Open slackmoehrle opened 8 years ago
yes, other alternatives are:
Can refer to #16410. The PR use OpenAL for linux.
I don't really know how powerful/fast/etc. those alternatives are, but from my point of view, OpenAL has a big advantage: It's a cross-platform library. The implementation for Windows only uses OpenAL, MPEG, and Vorbis, which are available for Windows as well as for Linux. Due to this fact, I could simply copy the source files and it worked. All tests were positive, the C++ test and the Lua test. Another option would be to merge those implementations into one which would make maintaining the engine way easier. I could do that for Linux and Windows if you like this idea.
@Janonard you are right. @dumganhar i think you can take a look too. I think it is better that we can use OpenAL as possible, then it is easy to main the codes.
Another option would be to merge those implementations into one which would make maintaining the engine way easier. I could do that for Linux and Windows if you like this idea.
Yep, it is better.
Agree this.
We only need OpenSLES for Android & OpenAL for other platforms. Easily maintaining our engine is really important.
BTW, we also need to improve New Audio Engine since I think the logic isn't very clear for developer to understand, we need to do more encapsulation, abstraction and documentation.
OpenAL-soft has a OpenSLES driver built-in:
In particular, this blocks a Debian package from being created.
And creates problems that we can't solve properly because no source, e.g.:
It also may create big problems with licensing target product.
Is there any progress in this direction?
Any progress?
@dumganhar Actual, OpenAL also can be use at android platform, recently, I have done it, and seems ok.
Any document about it?
Just compile openal, mpg123, ogg for android arm, then copy win32 implementation to android, and do some changes for log & file stream adapt.
I think OpenAL uses some system functions provided by Android, and i don't know if it has issue on some devices or some Android versions. It is not provided by Android, and also not Android documentation mention it, so it has big risk.
you can see it's backends has a opensl.c for android.
So, at android platform, OpenAL based on OpenSL. use it, we only needs maintains one audio engine framework.
Sounds good.
@minggo @dumganhar Recently, I finish this, you can see the patch: https://github.com/halx99/x-studio365/tree/master/cocos2d-x-patch
@halx99 It is great. @drelaptop please take a look. It is good if we can use OpenAL for all platforms.
OK, this week I will try to test and confirm OpenAL works or not on android platform. If works well, I can do replace recently.
@drelaptop By the way, I have test with ndkr14b + gcc, it work fine. maybe you need test ndkr16 + clang.
@drelaptop I create 2 pr, you can simple to apply it to test it. https://github.com/cocos2d/cocos2d-x/pull/18958 https://github.com/cocos2d/cocos2d-x-3rd-party-libs-bin/pull/317
I have test on ndk-r17 + clang, it also work fine.
you are so efficient, I will check it at once.
Please read my comments about Android OpenAL and mpg123 https://github.com/cocos2d/cocos2d-x/pull/18961#issuecomment-407562295 I think that we should not add new LGPL *.so libraries to Android!
I am fine with OpenAL and mpg123 for Linux (it is better than fmod :) )
@slackmoehrle could you help us check the License issue in your free time?
@halx99 , can I ask if it's any progress with Linux migration? BTW, @crazyhappygame , as windows part already uses OpenAL isn't it straightforward?
I am fine with OpenAL and mpg123 for Linux (it is better than fmod :) )
(nothing changed for Android I think that we should not add new LGPL *.so libraries to Android!)
I have test on ubuntu 18.04, the OpenAL works fine.
Could you please clarify how to build with OpenAL for Linux target?
Actually, LGPL.*.so allow free to use, and the apple os platform intrgrate OpenAL ad system framework, so, I think all platform, OpenAL is a good choice for audio framework backend.
And, in our project practice, OpenAL works well at android platform, and solve a deadlock bug on some android device when quickly stop/play music, see: https://github.com/cocos2d/cocos2d-x/issues/18000
Could you please clarify how to build with OpenAL for Linux target?
@HALX99 , do you build Cocos2d unpatched or with your patch? if the latter then where's the latest patch located?
I have build with cocos2d-x-3.17
@halx99 could you create PR for Linux only?
I will create when I have time
that will be better, if we do https://github.com/cocos2d/cocos2d-x/issues/16307 after this issue solved.
https://github.com/cocos2d/cocos2d-x/issues/18000, this is another reason why I recommand we also should use openal at android platform.
Users have stated that we are not truly open-source on Linux because we require
fmod
. This isn't free and they have no other options. During our weekly meeting @ricardoquesada suggested that we could offer SDL Audio as an alternative and let users turn onfmod
if they choose to. @linshun agreed. The timing of this change is TBD.@slackmoehrle is happy to test when ready.