Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sound problems

3 views
Skip to first unread message

Luke Tulkas

unread,
Oct 24, 2002, 8:36:59 AM10/24/02
to
I wanted to write a simple audio player using javax.sound.sampled.*.

Here's a part of what I wrote:

import java.io.*;
import javax.sound.sampled.*;
...
File file = new File(filename);
Line.Info lineInfo = new Line.Info(SourceDataLine.class);
SourceDataLine dataLine = (SourceDataLine)AudioSystem.getLine(lineInfo);
AudioInputStream input = AudioSystem.getAudioInputStream(file);
...

I ran the thing using Sun's jdk 1.4.1. To my surprise jvm threw out this
stack trace:

java.lang.NoClassDefFoundError: javazoom/jl/decoder/Bitstream
at
org.tritonus.sampled.file.MpegAudioFileReader.getAudioFileFormat(MpegAudioFi
leReader.java:136)
at
org.tritonus.sampled.file.MpegAudioFileReader.getAudioInputStream(MpegAudioF
ileReader.java:214)
at
org.tritonus.sampled.file.TAudioFileReader.getAudioInputStream(TAudioFileRea
der.java:94)
at
javax.sound.sampled.AudioSystem.getAudioInputStream(AudioSystem.java:748)
...etc....

Does anybody have any idea why some org.tritonus.sampled.file... would be
needed and (more importantly) why Sun is using it without shipping it with
their javax.sound API?


Luke Tulkas

unread,
Oct 24, 2002, 8:43:22 AM10/24/02
to

"Luke Tulkas" <luke_...@hotmail.com> wrote in message
news:ap8phc$sqc0n$1...@ID-64732.news.dfncis.de...

My bad. I had a tritonus provider (an old one, to make matters worse) in my
classpath.


0 new messages