servo/media

AudioBufferSourceNode: Consider using a better interpolation algorithm

Opened this issue · 0 comments

We use linear interpolation, as does Blink. Firefox uses libspeex for resampling, which has rust bindings. See

// XXX(collares): There are better fast interpolation algorithms.

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.