W3C home > Mailing lists > Public > public-audio-dev@w3.org > July 2014

Re: AudioBufferSourceNode: how to do restart?

From: Casper Schipper <casper.schipper@gmail.com>
Date: Fri, 25 Jul 2014 15:07:48 +0200
Cc: public-audio-dev@w3.org, Philippe Cohen <philc@audyx.com>, Yves Lasry <yves@audyx.com>
Message-Id: <9FF8CC46-05F3-4E03-9322-2D3041CA6C7B@gmail.com>
To: Yehonathan Sharvit <viebel@gmail.com>
That is surprising, since playback start time of the buffer should be sample accurate according to the spec.
What if you try to schedule stop and start a little bit further ahead (so context.currentTime + 0.05) ? 

Best regards,

On 23 jul. 2014, at 16:08, Yehonathan Sharvit <viebel@gmail.com> wrote:

> I cannot find in the API (http://webaudio.github.io/web-audio-api/) a way to restart  an AudioBufferSourceNode. The “loop” mode is not appropriate as I need to restart the node before it ends.
> I have tried to implement it by doing:
> 1. stop
> 2. recreate the node from the buffer
> 3. start
> But then there is a fraction of second with no sound making the transition not smooth.
> What is the best way to restart an AudioBufferSourceNode?

Received on Monday, 28 July 2014 13:20:33 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:03:54 UTC