AudioBufferSourceNode: Adjust buffer_pos when loop endpoints change
Opened this issue · 1 comments
collares commented
See
media/audio/buffer_source_node.rs
Line 125 in 86b9a28
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 commented