Accessing underlying bytes in a Audio Clip

Discussion in 'Java' started by Marco, Sep 8, 2005.

  1. Marco

    Marco Guest

    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
    Marco, Sep 8, 2005
    #1
    1. Advertising

  2. Marco

    Oliver Wong Guest

    "Marco" <> wrote in message
    news:dfpu1g$t7j$...
    > 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
    Oliver Wong, Sep 8, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mad Scientist Jr
    Replies:
    1
    Views:
    2,380
    Mad Scientist Jr
    Dec 8, 2006
  2. Replies:
    13
    Views:
    6,126
    GNightOwl
    Dec 3, 2008
  3. chump
    Replies:
    7
    Views:
    961
    Andrew Thompson
    Jan 19, 2007
  4. aeonsun
    Replies:
    2
    Views:
    408
    Luc The Perverse
    Mar 11, 2007
  5. sick dick
    Replies:
    0
    Views:
    376
    sick dick
    Apr 3, 2006
Loading...

Share This Page