Freshly Squeezed Progress Report: Android Audio Woes

Freshly Squeezed Progress Report: Android Audio Woes

Last time, I reported that I used to be engaged on creating an Android construct for testers for my second Freshly Squeezed Entertainment mission referred to as Clown Alley Creator, a creativity software about creating your personal enjoyable clowns.

Sprints 2024-21: Android port for play testing

Completed:

  • Create Android port

At the tip of the earlier week, I had created an Android port that functioned however that was lacking audio. Mostly.

As I suspected, I forgot to replace my Android construct scripts to cope with some subdirectories I made for Music and Sounds, so as soon as I addressed it, I had sound results.

But I nonetheless had no music. Weird.

My preliminary investigations advised me that my code positively thinks that the music is enjoying. It wasn’t a quantity subject.

But finally I appeared on the logs and located a line that mentioned that there was, in truth, an issue loading the music file. “Unrecognized audio format” was not the error I used to be anticipating, although.

Most of my sound results are .wav information, and my music file can be a .wav file. What provides?

Well, it turned out that libSDL2_mixer has a configuration flag that you should use to specify that you just need to assist .wav music information. My custom-built model doesn’t have it. Oddly, .wav sound results are supported simply fantastic out of the field.

Do I need it? No, the purpose of limiting assist to .ogg information primarily is that I need as slim a library bundled with my app as doable.

And talking of slimming issues down, that .wav music file? It was 9+ MB! THAT’S HUGE!

So I created a .ogg file as an alternative, which doesn’t even take up 1MB, and music works in my Android construct simply fantastic.

I additionally made certain to make use of the most recent libSDL2 and associated libraries, which required just a few minor updates in code.

Clown Alley Creator - Android build

At this level, I need to take a look at issues out on my finish earlier than releasing it to testers, however I anticipate to have a construct prepared for them this week. I’m trying ahead to the suggestions.

Thanks for studying, and keep curious!

—

Want to find out about future Freshly Squeezed video games I’m creating? Sign up for the GBGames Curiosities publication, and obtain the total shade Player’s Guides to my present and future video games without spending a dime!

The put up Freshly Squeezed Progress Report: Android Audio Woes first appeared on GBGames.

HI-FI News

by way of The Blog | GBGames https://www.gbgames.com

March 31, 2025 at 12:35PM