Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Tritonus and Mac OS X

Hello

I have been battling with trying to use the Tritonus library (tritonus.org) on my Mac OS X (10.5.6) machine and I have hit a wall. I am trying to build an application to read and write MP3 files. I have placed the following jar (tritonus_share.jar, tritonus_mp3.jar, javalayer.jar) files in my extension folder (/system/library/java/extensions) and the binary files for the encoding ( liblametritonus.dylib, libmp3lame.dylib) in my binary folder (/usr/lib/java). Using the sample programs at jsresources.org, which compile correctly, I am still unable to read or encode MP3 files. Do you know if anyone has managed to get the Tritonus libraries to work on Mac OS X? Is there something I am missing?

As a side note I have been able to successful read MP3 files using the plug-in provided by Sun ( http://java.sun.com/javase/technologies/desktop/media/jmf/mp3/download.html) and MP3SPI provided by javazoom ( http://www.javazoom.net/mp3spi/mp3spi.html) so it appears my problems are only with the Tritonus plug-in.

Macbook Pro 15, Mac OS X (10.5.6)

Posted on Jan 13, 2009 6:28 PM

Reply
1 reply

Jan 28, 2009 4:00 PM in response to Antitheos

The problem I encountered appears to be in the MpegAudioFileReader class. When reading a file it tries to determine if its an MP3 file by looking for the sync bits in the header of the first frame. Unfortunately it assumes the data begins immediately at the start of the file, so it reads the first four bytes, thinking this is where the MP3 data begins. Reading on the internet it appears actually the data does not necessarily begin at the start of file, and an implementer needs to search through the file for the beginning of the first frame. So when I tried to use the library I received the error "not a MPEG stream: no sync bits" from the method MpegAudioFileReader.getAudioFileFormat. What made this tricky to track down was that the original error gets masked and all the user gets is a generic message that the format is unsupported. I had to use the MpegAudioFileReader class directly in order to be able to see this message.

I got the sample problem when I tried it on a windows machine. I resulted to using the Java MP3 plug-in.

Tritonus and Mac OS X

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.