Hey there.
For a while now I’ve had this nightmare of an issue where the game that I’m working on locks up completely when I try to play an ogg music file. (upon calling .play() on the audioNode) It seems to only happen with ogg, as wav works fine (but is extremely large in filesize!)
The oggs play just fine in a brand new JME application, so the export/format is not at fault.
At this point I’m really not sure what could be tripping this, because there’s nothing audio related that I can see which is handled differently than another JME project I’ve worked on, where I had no such issue.
I’ve tried fiddling with the stream & cache booleans on initialization, no bueno.
Debugging seems to show that it’s stuck on line 94 of OGGLoader.java (I use the 3.0 SDK)
It’s this line:
if ((cnt = vs.readPcm(buf, offset + bytesRead,length - bytesRead)) <= 0) {
Furthermore, there’s a hidden source calls section with a stack that changes a little bit between each pause. (there’s probably more than just these two but my debugging skills aren’t my strong suit)
"LWJGL Renderer Thread"
de.jarnbjo.vorbis.MdctFloat.imdct(MdctFloat.java:189)
de.jarnbjo.vorbis.AudioPacket.<init>(AudioPacket.java:191)
de.jarnbjo.vorbis.VorbisStream.getNextAudioPacket(VorbisStream.java:170)
de.jarnbjo.vorbis.VorbisStream.readPcm(VorbisStream.java:140)
com.jme3.audio.plugins.OGGLoader$JOggInputStream.read(OGGLoader.java:94)
"LWJGL Renderer Thread"
de.jarnbjo.util.io.ByteArrayBitInputStream.getInt(ByteArrayBitInputStream.java:138)
de.jarnbjo.vorbis.CodeBook.readVvAdd(CodeBook.java:207)
de.jarnbjo.vorbis.Residue2.decodeResidue(Residue2.java:97)
de.jarnbjo.vorbis.AudioPacket.<init>(AudioPacket.java:159)
de.jarnbjo.vorbis.VorbisStream.getNextAudioPacket(VorbisStream.java:170)
de.jarnbjo.vorbis.VorbisStream.readPcm(VorbisStream.java:140)
com.jme3.audio.plugins.OGGLoader$JOggInputStream.read(OGGLoader.java:94)
It almost seems like it’s supposedly loading, but why on earth would it take hours when the same thing loads up instantly in a different app?
Any ideas on what might be going wrong? (or how I could track down what’s causing the lockup?)
Thanks in advance!