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 libgdx-audio.so 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.
Posted
on January 3, 2012, 5:55 pm,
by Mario,
under libgdx, OMG Ponies!.
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
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. I could take on the part of a technical reviewer and 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 apart from going over Robert’s changes.
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.
Posted
on December 29, 2011, 1:29 am,
by Mario,
under libgdx, OMG Ponies!.
I just updated libgdx to use Lwjgl 2.8.2 on the desktop. Please test it on your favorite platform and let me know of any problems. I tested it on win32/64 and lin32/64 (Ubuntu in VirtualBox with HW acceleration enabled) without any kind of problems.
The new version also allows us to have the Lwjgl window be resizable. To enable this feature just set the respective field in LwjglApplicationConfiguration to true:
Posted
on December 28, 2011, 12:00 pm,
by Mario,
under libgdx, OMG Ponies!.
I reworked the build system over the last couple of days. It’s now composed of the following:
build.xml: the master Ant build script. Responsible for building the core, all backends, extensions and docs
build-template.xml: a template Ant script used to build all projects. Invoked by the master build script with appropriate parameters for a project’s classpath, jars that should go into the output jar and so on.
That’s about it. As a result, the release/nightly builds now have the following structure:
The core and backend jars are in the root folder of the distribution. The armeabi/ and armeabi-v7a/ folder contain the natives for Android, the gdx-$projectname-natives.jar contain the natives for the respective desktop project.
The extensions folder has the same setup for extensions (jars + desktop natives jars + arm binaries).
In other news: i removed the audio analysis and decoder classes from the core, they are now in gdx-audio. I’ll have those finished by the end of the day, including the mpg123 decoder. Stb TrueType has been moved to its own extension as well (gdx-stb-truetype).
You can now easily build your own distribution by invoking:
ant -f build-new.xml
This will create a dist/ directory containing all the jars and natives for both core and extension projects as outlined above. Only requirement: ant needs to be on your $PATH, JAVA_HOME needs to point to your JDK installation.
David Erosa informed me that there is a spanish version of my book “Beginning Android Games”. I like it’s cover more than the other one Thanks for informing me David, my publisher can’t be boughter to write me a mail about such things.
We feel that the scene2d UI framework is sufficiently mature to be used as an alternative for TWL. We also don’t have a maintainer for the TWL extension anymore. I guess getting rid of it is the best solution to not have to much dead code in the trunk.
Posted
on December 3, 2011, 9:55 pm,
by Mario,
under libgdx.
Hi there,
fixed a couple of issues on the tracker today (or set them to invalid/won’t fix where appropriate). The biggest changes that might affect your application:
BitmapFont constructors taking a TextureRegion: if you call BitmapFont#dispose() on such a BitmapFont, the Texture the region refers to won’t be disposed. You have to explicitely kill that Texture yourself. This allows sharing a texture among BitmapFonts if you are not using AssetManager. With AssetManager, everything is done for you automatically, including reference counting.
The Lwjgl backend reported the delta y for the mouse cursor incorrectly. It’s sign is now inverted, in accordance with the behaviour of the Jogl and Android backends.
I fixed a couple of other issues and merged the patches people submitted. Thanks for that, very much appreciated! I hope to have more time for libgdx in the near future. Stay tuned for new stuff!