Results 1 to 2 of 2
Thread: Converting a byte[] into Sound
- 11-15-2007, 03:34 PM #1
Member
- Join Date
- Nov 2007
- Posts
- 2
- Rep Power
- 0
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
- 11-21-2007, 11:57 PM #2
Member
- Join Date
- Nov 2007
- Posts
- 2
- Rep Power
- 0
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
-
Byte Values
By javaplus in forum New To JavaReplies: 1Last Post: 06-23-2008, 12:08 AM -
using Byte arrays
By mew in forum New To JavaReplies: 2Last Post: 01-30-2008, 03:54 AM -
BufferedImage to Byte
By Java Tip in forum Java TipReplies: 0Last Post: 01-22-2008, 08:17 PM -
int to byte
By ravian in forum New To JavaReplies: 1Last Post: 01-13-2008, 07:22 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks