W3C home > Mailing lists > Public > public-audio@w3.org > July to September 2012

Re: Clearing the buffer of a BufferSourceNode

From: Peter van der Noord <peterdunord@gmail.com>
Date: Sat, 21 Jul 2012 18:42:49 +0200
Message-ID: <CAL9tNz_ejTiO7Q7e-0cGBbsvN4iQb4Vk5u5NKFDAG+sTgSBpsw@mail.gmail.com>
To: Chris Wilson <cwilso@google.com>
Cc: "public-audio@w3.org" <public-audio@w3.org>
http://www.petervandernoord.nl/patchwork_js

my buffersourcemodule has a pulldown to select a buffer you created
(add a buffer, enter a url or select a preset url with the pulldown).

if i'm busy editing a patch, it would be nice to be able clear the
buffer of a buffersource module. I think that if you can set it, you'd
have to be able to unset it. There's no way to go back the the state
it was before i set a buffer.

apart from that: my convolver module uses the same buffer-selector to
give it a buffer, and i cant seem to unset that one as well. with that
module, it probably makes more sense todo that. i can listen to thee
ffect of different responses, but i can't listen to the original sound
(without impulse response) anymore without completely removing the
module.

also, there's an insonsistancy: setting the convolvernode's buffer to
null doesn't give me an error (and doesn't remove the buffer either).

i think both should behave the same, and both should be able to clear
their buffer by setting it to null, or having a clearBuffer() method.


Peter

2012/7/21 Chris Wilson <cwilso@google.com>:
> Since buffersourcenodes are one-shot anyway, I'm not sure this would make sense.
>
> On Jul 21, 2012, at 8:08 AM, Peter van der Noord <peterdunord@gmail.com> wrote:
>
>> Is there a way to remove the buffer of a buffersource? i tried setting
>> the buffer property to null, but then i get the error:
>>
>> Uncaught TypeError: Value is not of type AudioBuffer
>>
>>
>> Peter
>>
Received on Saturday, 21 July 2012 16:43:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 21 July 2012 16:43:17 GMT