Login  Register

GLMediaPlayer not playing short MP3 files

Posted by asambol on Jan 21, 2015; 12:06pm
URL: https://forum.jogamp.org/GLMediaPlayer-not-playing-short-MP3-files-tp4033889.html

I'm using GLMediaPlayer for playing MP3 files and it works fine for "normal" files, i.e. songs.

However, playing very short files (< 1 sec duration) doesn't work. Here is the MP3 file: http://tinyurl.com/obzre8x

Opening file in audacity and saving again with usual MP3 LAME settings doesn't help.
Converting to WAV doesn't help either.
Converting to WAV and extending it to 5 sec duration works good in GLMediaPlayer.
Extending the original MP3 to 5 sec duration doesn't work in GLMediaPlayer.
Extending the original MP3 to 15 sec duration works good in GLMediaPlayer.

No exception is thrown on playback start. I tried with -Djogl.debug.GLMediaPlayer -Djogl.debug.GLMediaPlayer.Native and I get the following output on playback start:
Regular MP3 file (works fine): http://pastebin.com/pVuaFsTw
Short MP3 file: http://pastebin.com/KnrBtzkx

So the only difference I see is that for short files the Stream doesn't even start - after playing, GLMediaPlayer switches to Paused state right away.

I can't post a self contained code example but I'm basically using MovieSimple code (with only audio stream, of course).

For now, I will convert all short files to 5sec WAV files, but would like to know if there is a simple solution I'm overlooking.