For those of you who would like to play mp3, ogg, but also several mod formats (it, xm, s3m, mod) on Windows and Android in ZGE I prepared a new external library ZgeHekkus which is an adapter to the free (donateware) multi-platform Hekkus Sound System library.
The ZGE demo project and Windows dll can be downloaded from here.
I'm working on Android version now. Later, I'll update also the demo project to show more possibilities, put the sources and manuals to Goodle Code, etc, etc.
Have a fun! Any comments are welcome.
Note: As Kjell tells you, this library is not actually needed for playing mp3 files on Windows. That's true. However, to create ZGE applications which use files of the aforementioned music formats for free on Windows and Android, Hekkus is a very good option.
Hekkus Sound System for ZGE
Moderator: Moderators
ZgeHekkus sound library has been compiled for Android and also a new demo showing dynamic setting of sound's pan and pitch has been added. The both demos now run on Windows and Android.
The previously published API was slightly changed and the current version is officially v0.9.
You can download all this from the download page.
The previously published API was slightly changed and the current version is officially v0.9.
You can download all this from the download page.
- Attachments
-
- screenshots from demos
- scr1.jpg (46.89 KiB) Viewed 22759 times
Thanks Ville. I'm still trying to to come up with an optimal solution for good and free music support in ZGE for Windows and Android platforms. Hekkus is an interesting feature-rich library with relatively simple and easy-to-use interface. So I had to try it... and it works perfectly.
Do you think it can be included in the official ZGE distribution's library?
(However, I haven't stopped looking for perfection in external music player... it will become reality in my next ZGE extension. )
Do you think it can be included in the official ZGE distribution's library?
(However, I haven't stopped looking for perfection in external music player... it will become reality in my next ZGE extension. )
Yes, it's free also for commercial projects. However, if you make enough money by a project with this library, you can donate the author; see the Hekkus web page (licence) for details.Imerion wrote:Looks great! I really need a free library that can play .ogg files. But is this also free for commercial projects?
Hi guys,
Keep in mind that in order to play a OGG / MP3 on Android, you basically only need to do this in Java ( or C++ ) ..
Just need to wrap that into a extension ( or component ).
K
Keep in mind that in order to play a OGG / MP3 on Android, you basically only need to do this in Java ( or C++ ) ..
Code: Select all
MediaPlayer foo = MediaPlayer.create(context, resource);
foo.start();
K
The problem is that the MediaPlayer class is available only in Java, there's no equivalent in NDK. It can be accessible from NDK via JNI, but you need to create an ZGE adapter library anyway (C++ to Java JNI interfacing is really a mess in the case of many non-static methods). Another option would be to create ZGE built-in functions to call OS API for playing mp3(+ogg) files, but I'm not sure Ville would like to do it.Kjell wrote: Keep in mind that in order to play a OGG / MP3 on Android, you basically only need to do this in Java ( or C++ ) ..
Instead, I'm working on a small OpenSL ES library for ZGE which also would bring more possibilities than MediaPlayer, if needed (positional 3D audio, effects, better playback control, ...).