Re: GLMediaPlayer not playing short MP3 files
Posted by asambol on Jan 22, 2015; 10:02am
URL: https://forum.jogamp.org/GLMediaPlayer-not-playing-short-MP3-files-tp4033889p4033891.html
I don't like the idea of introducing new dependencies to my project (since I'm already using ffmpeg for video playback), and Paul Lamb Sound Library requires 3 additional jar files (core, JOAL plugin and JOgg plugin).
Nevertheless, I tried it but couldn't load any sounds - according to documentation sounds need to be inside a JAR file or online/http. I couldn't load anything from filesystem, even after SoundSystemConfig.setSoundFilesPackage().
For now, I would like to continue using FFMPEGMediaPlayer for playing both video and MP3 files but it seems kinda buggy:
1. Short sounds don't work at all. For now I quickfixed by adding 10 sec silence to the end of the file.
2. Long sounds aren't played to the end - EOS is reported ~10 seconds before a 4 minute song finishes - I guess it finishes playing when it finishes buffering? Could be related to bug #1.
3. Video playback doesn't report EOS event at all. I am registered as a GLMediaEventListener to the player and get other events (play, pause) normally, and I get EOS for MP3 files, but not for videos.