media icon indicating copy to clipboard operation
media copied to clipboard

AudioBufferSourceNode: Consider using a better interpolation algorithm

Open collares opened this issue 5 years ago • 0 comments

We use linear interpolation, as does Blink. Firefox uses libspeex for resampling, which has rust bindings. See https://github.com/servo/media/blob/86b9a2892af3774e42243ac84394a052719b2bf6/audio/buffer_source_node.rs#L390

This interacts interestingly with looping, because samples outside the loop window can (and should!) affect the resampled result inside the loop window. Also, the fact that the loop size need not be a multiple of the offset per tick complicates perfect resampling even further. There are a bunch of tradeoffs to be made here.

collares avatar Aug 20 '19 16:08 collares