Java Audio (urgent)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • pankhudi
    New Member
    • Apr 2007
    • 14

    #1

    Java Audio (urgent)

    Hi everyone...
    I have to do a project work related on online audio system in Java...I have done the server-client prog(socket prog) n playing audio files..But how to stream my audio file from one PC to other using Java(using socket programming)

    So i wanted to know whether it's possible?How?We have not been taught JMf..So still any hope..

    Please help i hav 2 submit this within 15 days..
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by pankhudi
    Hi everyone...
    I have to do a project work related on online audio system in Java...I have done the server-client prog(socket prog) n playing audio files..But how to stream my audio file from one PC to other using Java(using socket programming)

    So i wanted to know whether it's possible?How?We have not been taught JMf..So still any hope..

    Please help i hav 2 submit this within 15 days..
    The basics are fairly easy: on the server sider create a ServerSocket (using a port)
    and make it accept() a client. The accept() call only returns when a client tries
    to connect to the server. Given the Socket returned, get its InputStream and
    start reading away ...

    On the client side create an ordinary Socket and bind it to the server address
    and port (see above). Once connected user the Socket to get an OutputStream
    and start writing away ...

    Read the API docs for the ServerSocket and Socket classes for the details.

    kind regards,

    Jos

    Comment

    Working...