Changeset 3cd9fdd


Ignore:
Timestamp:
Oct 17, 2013, 1:09:20 PM (11 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:
b0706d8
Parents:
8617843
Message:

src/fmat.h: fmat_get_channel to write to an fvec_t

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/fmat.c

    r8617843 r3cd9fdd  
    5555  s->data[channel] = data;
    5656}
    57 smpl_t * fmat_get_channel(fmat_t *s, uint_t channel) {
    58   return s->data[channel];
     57void fmat_get_channel(fmat_t *s, uint_t channel, fvec_t *output) {
     58  output->data = s->data[channel];
     59  output->length = s->length;
     60  return;
    5961}
    6062
  • src/fmat.h

    r8617843 r3cd9fdd  
    9292
    9393*/
    94 smpl_t * fmat_get_channel(fmat_t *s, uint_t channel);
     94void fmat_get_channel (fmat_t *s, uint_t channel, fvec_t *output);
    9595/** write channel vector into a buffer
    9696
  • tests/src/test-fmat.c

    r8617843 r3cd9fdd  
    1818    }
    1919  }
     20  fvec_t channel_onstack;
     21  fvec_t *channel = &channel_onstack;
     22  fmat_get_channel(mat, 1, channel);
     23  fvec_print (channel);
    2024  // print out matrix
    2125  fmat_print(mat);
Note: See TracChangeset for help on using the changeset viewer.