play mp3
Hi:
I have a VJ++ standalone application that could play
.wav files and surf web. Also i have another web-based
JSP/Servlet application with server running Linux +
Tomcat+ Apache. I am now have to integrated the two
applications. The problems are: 1) VJ++ application is
not supported by linux, i have to either rewrite it to
java or other language. 2) Java does not support MP3
format. If i rewrite to java, .wav file is too big for
customer to download through browser i have convert it
to mp3, but mp3 is not supported by java. 3rd part
software is not good choice (i know javaLayer could
play mp3, but license issue could be a problem).
Thus what is the best way to integrate the 2
applications? Which language should i use in order to
rewrite the VJ++ application if i have to rewrite? Is
perl or c++ a good solution? If stick with either Perl
or C++, how could i call perl/C++ application from
JSP/Servlet, just a html link?
Some ideas and references please. Java Sound API is not helpful.
[1119 byte] By [
ioas8619a] at [2007-9-29 16:00:31]

javazoom:
Try JavaLayer library for J2SE :
http://www.javazoom.net/javalayer/javalayer.html
Any chance you (or anyone who knows how to use this package) could supply some simple source examples of how to use this package in a simple standalone application, along the lines of: create a blank window, if the mouse is down the mp3 plays.
I'm interested in using this in some games I'm plodding away at but I'm hopeless at reading through and understanding java documentation. A simple source example would be a great help.
Thanks
Don't use JavaLayer directly. Use the JavaSound SPI versions. i.e.:
http://www.javazoom.net/mp3spi/mp3spi.html
http://www.javazoom.net/vorbisspi/vorbisspi.html
The second link allows you to play Vorbis files. These files allow you to play MP3s and OGG files as if they were supported by JavaSound. For a player, you can use one of the examples from here:
http://www.jsresources.org/examples/audio_playing_recording.html
As long as the MP3SPI Jars (or VorbisSPI Jars) are in your classpath, any of these JavaSound players should work.