Accessing underlying bytes in a Audio Clip

M

Marco

Dear Sirs...
i'm trying to access the unredlaying bytes (or frames) in a Clip object.
How can i do that?
I may open the clip from a served byte array, but so i have to double the
memory allocated, and this is unacceptable...
So i' shuold open the clip from an AudioInputStream, but i cannot find a
method to access the bytes.

Thank you

Marco
 
O

Oliver Wong

Marco said:
Dear Sirs...
i'm trying to access the unredlaying bytes (or frames) in a Clip object.
How can i do that?
I may open the clip from a served byte array, but so i have to double the
memory allocated, and this is unacceptable...

What are you doing that (makes you think) memory allocation is being
doubled? Did you actually profile this to make sure it is the case? I'd
expect the Clip to use the buffer you provided, rather than make a copy of
it.
So i' shuold open the clip from an AudioInputStream, but i cannot find a
method to access the bytes.

Did you see the read() method? JavaDoc says: "Reads the next byte of
data from the audio input stream."

- Oliver
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top