I just finished off gdx-audio, our newest extension. Features:

  • Decoders for mp3, ogg Vorbis and wav, using Mpg123, Xiph Tremor
  • KissFFT and Java FFT by Damien Di Fede for comparison
  • SoundTouch for pitch shifting, time stretching and playback rate modification

To use the extension add the gdx-audio.jar and gdx-audio-natives.jar to your desktop project. For your android project add the gdx-audio.jar and copy the files to your libs/armeabi and libs/armeabi-v7a folders.

For usage examples see:

  • Mpg123Test, shows how to decode an mp3 with the Mpg123Decoder class
  • VorbisTest, shows how to decode an ogg with the VorbisDecoder class
  • WavTest, shows how to decode an wav with the WavDecoder class
  • SoundTouchTest, shows how to apply pitch shifting to a PCM stream

Caveat: the vorbis and mp3 decoder can only decode files stored on the external storage. I might be able to work around that limitation in the future. For most practical purposes it shouldn’t be to limiting.

gdx-jnigen: a stupid idea that might just work

Since i’m to lazy to type, i made a demo video. All the native code in libgdx uses this now. I explain the reasons in the video. Use at your own risk. Also, sorry for the crappy audio, my headset died.

edit: as Riven kindly pointed out, there’s a bug in the add method. Look at the offset, now back to me, now back at numElements, now back to me. Sadly, i never learned how to iterate over arrays given offsets 😀

Beginning Android 4 Games Development

preface: this is soley my view of things, Robert has nothing to do with this post.

So, i was asked by my publisher to write a second edition of “Beginning Android Games”, updated to ICS. At the time i was asked, ICS was not out yet, there were also just rumours and nobody really knew when it would drop. On top of that, i didn’t have the intent of writting a second edition, as i just finished the first one and was loaded with a ton of other work that had to take priority.

I declined the offer. I was informed that they would hire another person (any other person really) to do the job and that i would lose my authorship (that is, my name wouldn’t be on the book even if it was 100% my writting). The contract i signed for the first edition gives the publisher the full right to do that, for better or worse. For obvious reasons i didn’t want this to happen. So i asked Robert Green from Battery Powered Games if he wanted to take over. He’d write the additions.

The end result is an updated version of the original book, with bug and typo fixes and a few additions concerning Honeycomb and ICS. I did not invest any time.

If anything, it should have been called “Beginning Android Games, Second Edition”, putting 4 in the title is suggesting it’s full of ICS related material.

I can not add more at this point due to legal reasons. Suffice it to say that i’m not happy with it either and as with any purchase, you have to evaluate whether it’s worth it for you or not.

Here’s the second edition’s TOC on Amazon for your convenience.