Ok, I have experimented a little and I can state my question more precisely. I
have used an AudioInputStream to get the sample data. However I have to deal
with things like big/little endian, sample size, etc. myself. Is there some
method available which simply feeds the AudioInputStream into an int[] buffer
containing all the samples? An InputStream (or Iterator or whatsoever) that
returns ints would also be ok. Any ideas?
Cheers,
Simon
Andrew Thompson - 07 Sep 2006 14:00 GMT
> Ok, I have experimented a little and I can state my question more precisely. I
> have used an AudioInputStream to get the sample data. However I have to deal
> with things like big/little endian, sample size, etc. myself. Is there some
> method available which simply feeds the AudioInputStream into an int[] buffer
> containing all the samples?
Not that I am aware. It would have been handy
when writing AudioTrace..
<http://www.physci.org/test/oscilloscope/>
Andrew T.
Matt Humphrey - 07 Sep 2006 21:53 GMT
> Ok, I have experimented a little and I can state my question more
> precisely. I
[quoted text clipped - 7 lines]
> that
> returns ints would also be ok. Any ideas?
I've seen JMF code to do this, but I don't know if it's the best way for
your AudioInputStream application. It's in "Swing Hacks" by Marinacci and
Adamson. They show how to open WAV or PCM media to get PCM samples.
Matt Humphrey matth@ivizNOSPAM.com http://www.iviz.com/