×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    3

    How to write a byte array to a audio file(.wav) in java?

    I am trying to a pass audiostream in form of bytes from client to server.
    Now i want to write this bytes to a file(.wav), but could not get a good code.
    The one i am using write bytes to the file, but when i try to play it nothing happens.

    Please help me.

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    Re: How to write a byte array to a audio file(.wav) in java?

    Quote Originally Posted by arpbansal View Post
    I am trying to a pass audiostream in form of bytes from client to server.
    Now i want to write this bytes to a file(.wav), but could not get a good code.
    The one i am using write bytes to the file, but when i try to play it nothing happens.

    Please help me.
    Its simple, you just need to start the file by writing the wave file headers then the byte data using JSR 75, file connection API.

    You can ref to the following links:
    http://stackoverflow.com/questions/7...ay-to-wav-java

    http://forums.sun.com/thread.jspa?threadID=5402696
    Last edited by im2amit; 2010-06-08 at 05:32.
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

  3. #3
    Registered User
    Join Date
    May 2010
    Posts
    3

    Re: How to write a byte array to a audio file(.wav) in java?

    I tried these links, but couldnot get a reasonable solution.
    How do we write the wave file headers exactly,
    Can you put a sample code here??

Similar Threads

  1. can we publish an object as byte array
    By mearunsingh in forum Symbian
    Replies: 2
    Last Post: 2008-05-07, 09:02
  2. sending a snapshot array byte to server
    By irene1986 in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2008-04-01, 21:52
  3. reading a byte array from text file
    By bloodyknight in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2004-08-01, 08:33
  4. Nokia MMS Java Library and Audio
    By Nokia_Archive in forum General Messaging
    Replies: 0
    Last Post: 2002-05-24, 00:00
  5. Nokia MMS Java Library and Audio
    By enstedt in forum General Messaging
    Replies: 3
    Last Post: 2002-05-15, 06:06

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×