According to https://github.com/WebAudio/web-audio-api/issues/336 loopStart and loopEnd should be rounded to the nearest sampling point. Chrome appears to do subsampling.
I think this snippet (for canopy) illustrates the sub-sampling that is done by chrome:
var context = new OfflineAudioContext(1, 100, 12800);
var src = context.createBufferSource();
var b = context.createBuffer(1, 3, context.sampleRate);
var d = b.getChannelData(0);
d[0] = 0;
d[1] = 1;
d[2] = 1;
src.buffer = b;
src.loop = true;
src.loopStart = 0.5 / context.sampleRate;
src.loopEnd = 2 / context.sampleRate;
src.connect(context.destination);
src.start();
The output should be the values 0 or 1, but nothing else. Chrome currently produces 0.5 for some values.
Also check to see if start()/stop() does subsample accuracy; they should be on a frame boundary.
Comment 1 by rtoy@chromium.org
, Oct 20 2016