public int Read(float[] buffer, int offset, int count) { for (int i = offset; i < offset + count; ++i) { buffer[i] = 0; } if (!source.IsReady(position, count)) { throw new Exception("All sources must be ready when exporting."); } else { int pos = source.Mix(position, buffer, offset, count); int n = Math.Max(0, pos - position); position = pos; return(n); } }
public int Read(float[] buffer, int offset, int count) { for (int i = offset; i < offset + count; ++i) { buffer[i] = 0; } if (!source.IsReady(position, count)) { Paused += count; return(count); } else { int pos = source.Mix(position, buffer, offset, count); int n = Math.Max(0, pos - position); position = pos; return(n); } }