Changeset 6510866


Ignore:
Timestamp:
Apr 8, 2013, 5:27:02 PM (12 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
8a7b344
Parents:
dc7f2cc
Message:

src/io/source_sndfile.c: mono to stereo, copying last channel of file to all remaining output matrix channels

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/source_sndfile.c

    rdc7f2cc r6510866  
    205205    }
    206206  }
     207  // if read_data has more channels than the file
     208  if (read_data->height > input_channels) {
     209    // copy last channel to all additional channels
     210    for (j = 0; j < read_samples / input_channels; j++) {
     211      for (i = input_channels; i < read_to->height; i++) {
     212        data[i][v] = s->scratch_data[ j * input_channels + (input_channels - 1)];
     213      }
     214    }
     215  }
    207216
    208217#ifdef HAVE_SAMPLERATE
Note: See TracChangeset for help on using the changeset viewer.