Changeset efaeaf1 for src/io


Ignore:
Timestamp:
Dec 20, 2018, 7:06:51 PM (6 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/timestretch, fix/ffmpeg5, master
Children:
6f22ed5
Parents:
2510248
Message:

[io] use memset in padding helpers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/ioutils.c

    r2510248 refaeaf1  
    9696aubio_source_pad_output (fvec_t *read_data, uint_t source_read)
    9797{
    98   uint_t i = 0;
    9998  if (source_read < read_data->length) {
    100     for (i = source_read; i < read_data->length; i++) {
    101       read_data->data[i] = 0.;
    102     }
     99    AUBIO_MEMSET(read_data->data + source_read, 0, read_data->length -
     100        source_read);
    103101  }
    104102}
     
    107105aubio_source_pad_multi_output (fmat_t *read_data,
    108106    uint_t source_channels, uint_t source_read) {
    109   uint_t i, j;
     107  uint_t i;
    110108  if (source_read < read_data->length) {
    111109    for (i = 0; i < read_data->height; i++) {
    112       for (j = source_read; j < read_data->length; j++) {
    113         read_data->data[i][j] = 0.;
    114       }
     110      AUBIO_MEMSET(read_data->data[i] + source_read, 0,
     111          read_data->length - source_read);
    115112    }
    116113  }
Note: See TracChangeset for help on using the changeset viewer.