Page 1 of 1

Hekkus Sound System for ZGE

Posted: Fri Jul 04, 2014 4:35 pm
by Rado1
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.

Posted: Sat Jul 05, 2014 11:21 pm
by Rado1
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.

Posted: Sun Jul 06, 2014 6:42 pm
by VilleK
Cool stuff as usual Rado1 :)

Posted: Tue Jul 08, 2014 6:29 pm
by Rado1
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. :-) )

Posted: Tue Jul 08, 2014 10:37 pm
by Imerion
Looks great! I really need a free library that can play .ogg files. But is this also free for commercial projects?

Also, you're making me very curious about that next extension. :)

Posted: Tue Jul 08, 2014 11:00 pm
by Rado1
Imerion wrote:Looks great! I really need a free library that can play .ogg files. But is this also free for commercial projects?
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.

Posted: Tue Jul 08, 2014 11:28 pm
by Kjell
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++ ) ..

Code: Select all

MediaPlayer foo = MediaPlayer.create(context, resource);
foo.start();
Just need to wrap that into a extension ( or component ).

K

Posted: Wed Jul 09, 2014 6:56 am
by Rado1
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++ ) ..
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.

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, ...).