Browse Source

oops, broke mono support while adding stereo support! fixed now

dds
Matt Bradshaw 6 years ago
parent
commit
b2c230c577
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      extras/wav2sketch/wav2sketch.js

+ 1
- 1
extras/wav2sketch/wav2sketch.js View File

context.decodeAudioData(file, function(buffer) { context.decodeAudioData(file, function(buffer) {
var monoData = []; var monoData = [];
if(buffer.numberOfChannels == 1) { if(buffer.numberOfChannels == 1) {
monoData = buffer.getChannelData(1);
monoData = buffer.getChannelData(0);
} else if(buffer.numberOfChannels == 2) { } else if(buffer.numberOfChannels == 2) {
var leftData = buffer.getChannelData(0); var leftData = buffer.getChannelData(0);
var rightData = buffer.getChannelData(1); var rightData = buffer.getChannelData(1);

Loading…
Cancel
Save