Hekkus Sound System for ZGE

Use of external libraries (DLLs) from ZGE.

Moderator: Moderators

Post Reply
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Hekkus Sound System for ZGE

Post 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.
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Post 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.
Attachments
screenshots from demos
screenshots from demos
scr1.jpg (46.89 KiB) Viewed 22743 times
User avatar
VilleK
Site Admin
Posts: 2317
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Cool stuff as usual Rado1 :)
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Post 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. :-) )
Imerion
Posts: 200
Joined: Sun Feb 09, 2014 4:42 pm

Post 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. :)
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Post 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.
User avatar
Kjell
Posts: 1910
Joined: Sat Feb 23, 2008 11:15 pm

Post 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
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

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