I know the javazoom packages will allow you to listen to a stream, but I haven't dealt with actually creating the stream itself (though I been meaning to do so). I know it'll connect to ice/shoutcast streams, so maybe that's something to look at.
This should play a stream:
BasicPlayer player = new BasicPlayer();
URL url = new URL("http://205.188.215.225:8018");
AudioFileFormat aff = AudioSystem.getAUdioFileFormat(url);
if (aff instanceof TAudioFileFormat)
{
Map props ((TAudioFileFormat)aff).properties();
String title = (String)props.get("mp3.shoutcast.metadata.icy-name");
String sUrl = (String)props.get("mp3.shoutcast.metadata.icy-url");
String genre = (String)props.get("mp3.shoutcast.metadata.icy-genre");
String bitrate = (String)props.get("mp3.shoutcast.metadata.icy-br");
player.open(url);
player.play();
}
How you stream the song from your own computer I'm not sure. You might need to run an icecast server.
Reputation Points: 92
Solved Threads: 51
Practically a Posting Shark
Offline 856 posts
since Mar 2004