Changeset 6ede3ab


Ignore:
Timestamp:
Dec 18, 2013, 7:29:16 AM (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:
c3c6305
Parents:
4f2c28c
Message:

src/lvec.h: clean up lvec api

Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/lvec.c

    r4f2c28c r6ede3ab  
    4040  s->data[position] = data;
    4141}
    42 lsmp_t lvec_read_sample(lvec_t *s, uint_t position) {
     42lsmp_t lvec_get_sample(lvec_t *s, uint_t position) {
    4343  return s->data[position];
    4444}
     
    5858}
    5959
    60 void lvec_set(lvec_t *s, smpl_t val) {
     60void lvec_set_all (lvec_t *s, smpl_t val) {
    6161  uint_t j;
    6262  for (j=0; j< s->length; j++) {
     
    6969  memset(s->data, 0, s->length * sizeof(lsmp_t));
    7070#else
    71   lvec_set(s, 0.);
     71  lvec_set_all (s, 0.);
    7272#endif
    7373}
    7474
    7575void lvec_ones(lvec_t *s) {
    76   lvec_set(s, 1.);
     76  lvec_set_all (s, 1.);
    7777}
    7878
  • src/lvec.h

    r4f2c28c r6ede3ab  
    5858*/
    5959void del_lvec(lvec_t *s);
     60
    6061/** read sample value in a buffer
    61 
    62   Note that this function is not used in the aubio library, since the same
    63   result can be obtained using vec->data[position]. Its purpose is to
    64   access these values from wrappers, as created by swig.
    6562
    6663  \param s vector to read from
     
    6865
    6966*/
    70 lsmp_t lvec_read_sample(lvec_t *s, uint_t position);
     67lsmp_t lvec_get_sample(lvec_t *s, uint_t position);
     68
    7169/** write sample value in a buffer
    72 
    73   Note that this function is not used in the aubio library, since the same
    74   result can be obtained by assigning vec->data[position]. Its purpose
    75   is to access these values from wrappers, as created by swig.
    7670
    7771  \param s vector to write to
     
    8074
    8175*/
    82 void  lvec_write_sample(lvec_t *s, lsmp_t data, uint_t position);
     76void  lvec_set_sample(lvec_t *s, lsmp_t data, uint_t position);
    8377
    8478/** read data from a buffer
    85 
    86   Note that this function is not used in the aubio library, since the same
    87   result can be obtained with vec->data. Its purpose is to access these values
    88   from wrappers, as created by swig.
    8979
    9080  \param s vector to read from
     
    10696
    10797*/
    108 void lvec_set(lvec_t *s, smpl_t val);
     98void lvec_set_all(lvec_t *s, smpl_t val);
    10999
    110100/** set all elements to zero
Note: See TracChangeset for help on using the changeset viewer.