jo_audio_load_pcm() Truncating Audio


Established Member
When I play my PCM audio file it plays back only ~2s of my 3s clip.

jo_audio_load_pcm("LIFEU.PCM", JoSoundStereo8Bit, &g_Assets.lifeUpPCM);

The mp3 itself:
Audio file with ID3 version 2.3.0, contains:MPEG ADTS, layer III, v1, 160 kbps, 44.1 kHz, Stereo

Converting with ffmpeg:
ffmpeg -i life-up.mp3 -f s8 -ac 1 -ar 44100 100.PCM

Verifying with ffplay the PCM file is correct:
ffplay -f s8 -ar 44.1k -ac 1 100.PCM , 44.1 kHz, Stereo

Any advice on what I'm doing wrong? Is this a bug in Jo Engine? Thanks in advance.


Gear Supporter
What is the file size?
Should be about 133kb.
I suspect this is too large and jo's loading buffer doesn't have enough room.
You can try using GFS functions to manually load the file to a low-work ram address and try to use SGL playback abstractions from there.


Established Member
Thanks for the reply. The file is 173 kb. When Jo Engine fails to load a file it errors out with a debug message. The file appears to be loading successfully.

I also extended the heap previously onto the low work RAM area.


Established Member
What are recommended settings for PCM files? Should I drop the 44.1 kHz down? 8000 kHz?

I have a really long bootup time for my game so I'm looking for ways to drop file size.