Sign in to follow this  

[java] Getting a Clip for a java sound SPI

Recommended Posts

I am trying to use the Tritonus plugins to load and play music saved in a compressed file format (.ogg and .wav compressed with the GSM 06.10 schema). The SPI appears to link to my program and load the file properly, but I don't know how to acquire a clip that will play the loaded music stream. Relevant code:
stream = AudioSystem.getAudioInputStream(url);
format = stream.getFormat();
frameLength = (int)stream.getFrameLength();
clip = AudioSystem.getClip(); AudioInputStream(stream, format, frameLength)); // Throws the below exception

javax.sound.sampled.LineUnavailableException: line with format VORBIS 44100.0 Hz, unknown bits per sample, stereo, unknown frame size, unknown frame rate,  not supported.
	at$DirectDL.implOpen(Unknown Source)
	at$DirectClip.implOpen(Unknown Source)
	at Source)
	at$ Source)
	at$ Source)
	at (my code...)

Can anyone help?

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this