2 Replies - 6413 Views - Last Post: 01 August 2013 - 03:47 AM Rate Topic: -----

#1 Logical94   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 17
  • Joined: 04-June 13

Java Audio Streaming Application

Posted 01 August 2013 - 12:47 AM

Hello, I am thinking about writing an application in Java, which does the following:

1. App grabs data from a database, more specifically: a URL to an MP3 file. (Example: www.mysite.com/music/file.mp3)
2. Client will tell the server to either stream the file during playing the song, or download it then play it (Not entirely sure which is better or possible, but I would prefer to stream while playing if that is possible with Java)

Just to be clear, the client will tell a server to perform those actions, and then the server will transmit the music data from the server to the client, or if it's better, maybe the client should stream the music directly from the source of the file, rather than using the server app as a middleman. (Some guidance would be appreciated)

The thing is, I have absolutely no idea how I would transmit audio from one source to another with Java. I know there are built in Java classes/methods for dealing with playing sounds, but I know nothing of any library that deals with streaming audio while it downloads, as 1 hour long songs could become problematic if the app has to download the whole thing with a slow network speed, before the song will play.

So any help with this would be greatly appreciated once again. I have looked a bit online, and haven't found anything sufficient yet, so I thought it would be best to consult the professionals on here.

Thank you very much.

Is This A Good Question/Topic? 0
  • +

Replies To: Java Audio Streaming Application

#2 g00se   User is offline

  • D.I.C Lover
  • member icon

Reputation: 3541
  • View blog
  • Posts: 16,135
  • Joined: 20-September 08

Re: Java Audio Streaming Application

Posted 01 August 2013 - 03:41 AM

How about http://www.subsonic....pages/index.jsp ?
Was This Post Helpful? 0
  • +
  • -

#3 pbl   User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8378
  • View blog
  • Posts: 31,956
  • Joined: 06-March 08

Re: Java Audio Streaming Application

Posted 01 August 2013 - 03:47 AM

Sure it will be more efficient if the Client has read access to the file to have the Server just to send back the URL of the audio file.

As far as the download is concerned, just send the Audio file as byte arrays. Multiple TCP/IP tutorial are available on the subject
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1