copySampleValue method

dynamic copySampleValue(
  1. num index
)

Implementation

copySampleValue(num index) {
  // copies a sample value to the result buffer

  var result = resultBuffer,
      values = sampleValues,
      stride = valueSize,
      offset = index * stride;

  for (var i = 0; i != stride; ++i) {
    result[i] = values[offset + i];
  }

  return result;
}