Audio streaming (urgent)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pankhudi
    New Member
    • Apr 2007
    • 14

    #1

    Audio streaming (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..
  • puntino
    New Member
    • Mar 2007
    • 4

    #2
    I don't have experience with socket but i think you could use multicasting.

    Comment

    • sicarie
      Recognized Expert Specialist
      • Nov 2006
      • 4677

      #3
      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..
      Didn't JosAH already respond to this?

      Please do not double-post. If you are worried that we have forgotten your post, after 24 hours you can reply to it with a "bump" post, which will move it back to the top.

      Comment

      • pankhudi
        New Member
        • Apr 2007
        • 14

        #4
        Originally posted by sicarie
        Didn't JosAH already respond to this?

        Please do not double-post. If you are worried that we have forgotten your post, after 24 hours you can reply to it with a "bump" post, which will move it back to the top.
        Hello i just logged in yest..Who is JosAh ? anyways can i get any help 4m u regarding this..it's really urgent n d othr reply i got didn help much :(

        Actually i searchd a lot on net but no suitable ans..

        Expecting ur co-operation

        Thanks

        Comment

        • JosAH
          Recognized Expert MVP
          • Mar 2007
          • 11453

          #5
          Originally posted by pankhudi
          Hello i just logged in yest..Who is JosAh ? anyways can i get any help 4m u regarding this..it's really urgent n d othr reply i got didn help much :(
          That's me ;-) and I answered you in your first topic here. And as said before:
          don't double post; it's confusing for your readers. Do you want me to remove
          your other thread?

          kind regards,

          Jos

          Comment

          • pankhudi
            New Member
            • Apr 2007
            • 14

            #6
            Originally posted by JosAH
            That's me ;-) and I answered you in your first topic here. And as said before:
            don't double post; it's confusing for your readers. Do you want me to remove
            your other thread?

            kind regards,

            Jos
            Hi,ya u may remove the other thread..Sorry 4 d trouble..
            But i didnt get it, i mean is it possible to write the prog 4 audio files just as we do 4 normal ones..In my server side should i convert it to bytes form using ByteStream and then how do i write it on socket ??

            I cant write d whole file at once..right? convertin audio files to bytes is supported in Java? Pl help..

            Comment

            • JosAH
              Recognized Expert MVP
              • Mar 2007
              • 11453

              #7
              Originally posted by pankhudi
              Hi,ya u may remove the other thread..Sorry 4 d trouble..
              But i didnt get it, i mean is it possible to write the prog 4 audio files just as we do 4 normal ones..In my server side should i convert it to bytes form using ByteStream and then how do i write it on socket ??

              I cant write d whole file at once..right? convertin audio files to bytes is supported in Java? Pl help..
              An audio file is just a (binary) file just as other type of files. You can open
              an audio file for reading using a simple FileInputStream and read from it.

              How you want to send the bytes across the wire depends on you: the other
              party must know how many bytes you are going to send one way or another
              so you could send the length of the file first, followed by the actual content
              of the audio file.

              What the other party is going to do with those bytes is also up to you: you
              could use a simple FileOutputStrea m and write those bytes to that file.

              kind regards,

              Jos

              Comment

              • pankhudi
                New Member
                • Apr 2007
                • 14

                #8
                Originally posted by JosAH
                An audio file is just a (binary) file just as other type of files. You can open
                an audio file for reading using a simple FileInputStream and read from it.

                How you want to send the bytes across the wire depends on you: the other
                party must know how many bytes you are going to send one way or another
                so you could send the length of the file first, followed by the actual content
                of the audio file.

                What the other party is going to do with those bytes is also up to you: you
                could use a simple FileOutputStrea m and write those bytes to that file.

                kind regards,

                Jos

                OK..so here was i stuck up,whether v can directly use FileInputStream ..i shall try it today itself then..Thanks !!

                N if i stil get bugs, wil let u kno tomo..anyways thnx a lot..bye 4 now..

                Comment

                • JosAH
                  Recognized Expert MVP
                  • Mar 2007
                  • 11453

                  #9
                  Originally posted by pankhudi
                  N if i stil get bugs, wil let u kno tomo..anyways thnx a lot..bye 4 now..
                  Ok, you're welcome of course; one little thing though: this is an international
                  forum and quite a few participants don't speak English as their native language.

                  Trying to understand what your problem is all about is one thing; trying to
                  figure out those acronyms is quite another thing. Do your readers a favour
                  please and write full words and sentences. This is not an SMS forum; Thank
                  you for cooperating.

                  kind regards,

                  Jos

                  Comment

                  Working...