Results 1 to 2 of 2
  1. #1
    savage82 is offline Member
    Join Date
    Nov 2007
    Posts
    2
    Rep Power
    0

    Default Converting a byte[] into Sound

    Hi,

    This is my first post so please be kind. I am an honours student studying Software Engineering and currently working on my dissertation project.

    Briefly I am transmitting sound, image and text over a network but send the image and sound as byte arrays.

    I started to use the sun.audio package to play the sound BUT my code needs to work on a PDA on version 1.3 and my code is in 1.6 so compilation causes an ID mismatch and therefore an error.

    Does anyone know of a way to successfully use the java sound API to successfully transfer a byte array into audio. I originally tried it using SourceDataLine etc but got a muffled/distorted noise.

    I cannot save anything on the PDA so can't create a sound file and then use the file for playing the sound.

    Any advice or information would be much appreciated.
    Regards,
    Lea

  2. #2
    savage82 is offline Member
    Join Date
    Nov 2007
    Posts
    2
    Rep Power
    0

    Default Still need help on Sound

    Hi Again,

    I thought JMF might be able to help and was hoping it would offer a suitable alternative but does not have the handy J2ME style of:

    Player p = Manager.createPlayer(inputstream, "WAV") (Not perfect code I know)

    Does anyone know how you would do this in JMF?

    Regards,
    Lea

Similar Threads

  1. Byte Values
    By javaplus in forum New To Java
    Replies: 1
    Last Post: 06-23-2008, 12:08 AM
  2. using Byte arrays
    By mew in forum New To Java
    Replies: 2
    Last Post: 01-30-2008, 03:54 AM
  3. BufferedImage to Byte
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-22-2008, 08:17 PM
  4. int to byte
    By ravian in forum New To Java
    Replies: 1
    Last Post: 01-13-2008, 07:22 PM

Posting Permissions

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