 <p>Figured it out, think I have been multiplying by 1000 when I shouldn't have, the following works</p> <pre><code>var offset = (int)Math.Floor(buffer.WaveFormat.SampleRate * barDuration / 128) * 128 * bar; </code></pre>