media icon indicating copy to clipboard operation
media copied to clipboard

AudioBufferSourceNode: Adjust buffer_pos when loop endpoints change

Open collares opened this issue 5 years ago • 1 comments

See https://github.com/servo/media/blob/86b9a2892af3774e42243ac84394a052719b2bf6/audio/buffer_source_node.rs#L125

The spec doesn't clarify how the adjustment should be made. There's one thing to keep in mind: Even for fixed loop endpoints, self.buffer_pos can be slightly outside the loop bounds when process() starts; this is because we increment buffer_pos right after outputting a sample, but only loop right before outputting a sample. Any implementation must behave the same as this, because the playback algorithm (https://webaudio.github.io/web-audio-api/#playback-AudioBufferSourceNode) is normative.

collares avatar Aug 20 '19 16:08 collares

https://github.com/WebAudio/web-audio-api/issues/2033

collares avatar Aug 20 '19 16:08 collares