Converting raw bytes into audio sound

Posted by Afro Genius on Stack Overflow See other posts from Stack Overflow or by Afro Genius
Published on 2010-05-07T08:21:42Z Indexed on 2010/05/07 8:28 UTC
Read the original article Hit count: 359

Filed under:
|
|
|

In my application I inherit a javastreamingaudio class from the freeTTS package then bypass the write method which sends an array of bytes to the SourceDataLine for audio processing. Instead of writing to the data line, I write this and subsequent byte arrays into a buffer which I then bring into my class and try to process into sound. My application processes sound as arrays of floats so I convert to float and try to process but always get static sound back.

I am sure this is the way to go but am missing something along the way. I know that sound is processed as frames and each frame is a group of bytes so in my application I have to process the bytes into frames somehow. Am I looking at this the right way? Thanx in advance for any help.

© Stack Overflow or respective owner

Related posts about java

Related posts about javasound