Changeset c7860af for src/lvec.h


Ignore:
Timestamp:
Dec 4, 2009, 1:32:43 AM (14 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:
66fb3ea
Parents:
c6d0169
Message:

modified fvec and lvec to be mono, added fmat

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/lvec.h

    rc6d0169 rc7860af  
    3939typedef struct {
    4040  uint_t length;   /**< length of buffer */
    41   uint_t channels; /**< number of channels */
    42   lsmp_t **data;   /**< data array of size [length] * [channels] */
     41  lsmp_t *data;   /**< data array of size [length] */
    4342} lvec_t;
    4443
     
    4645
    4746  \param length the length of the buffer to create
    48   \param channels the number of channels in the buffer
    4947
    5048*/
    51 lvec_t * new_lvec(uint_t length, uint_t channels);
     49lvec_t * new_lvec(uint_t length);
    5250/** lvec_t buffer deletion function
    5351
     
    5957
    6058  Note that this function is not used in the aubio library, since the same
    61   result can be obtained using vec->data[channel][position]. Its purpose is to
     59  result can be obtained using vec->data[position]. Its purpose is to
    6260  access these values from wrappers, as created by swig.
    6361
    6462  \param s vector to read from
    65   \param channel channel to read from
    6663  \param position sample position to read from
    6764
    6865*/
    69 lsmp_t lvec_read_sample(lvec_t *s, uint_t channel, uint_t position);
     66lsmp_t lvec_read_sample(lvec_t *s, uint_t position);
    7067/** write sample value in a buffer
    7168
    7269  Note that this function is not used in the aubio library, since the same
    73   result can be obtained by assigning vec->data[channel][position]. Its purpose
     70  result can be obtained by assigning vec->data[position]. Its purpose
    7471  is to access these values from wrappers, as created by swig.
    7572
    7673  \param s vector to write to
    77   \param data value to write in s->data[channel][position]
    78   \param channel channel to write to
     74  \param data value to write in s->data[position]
    7975  \param position sample position to write to
    8076
    8177*/
    82 void  lvec_write_sample(lvec_t *s, lsmp_t data, uint_t channel, uint_t position);
    83 /** read channel vector from a buffer
     78void  lvec_write_sample(lvec_t *s, lsmp_t data, uint_t position);
    8479
    85   Note that this function is not used in the aubio library, since the same
    86   result can be obtained with vec->data[channel]. Its purpose is to access
    87   these values from wrappers, as created by swig.
    88 
    89   \param s vector to read from
    90   \param channel channel to read from
    91 
    92 */
    93 lsmp_t * lvec_get_channel(lvec_t *s, uint_t channel);
    94 /** write channel vector into a buffer
    95 
    96   Note that this function is not used in the aubio library, since the same
    97   result can be obtained by assigning vec->data[channel]. Its purpose is to
    98   access these values from wrappers, as created by swig.
    99 
    100   \param s vector to write to
    101   \param data vector of [length] values to write
    102   \param channel channel to write to
    103 
    104 */
    105 void lvec_put_channel(lvec_t *s, lsmp_t * data, uint_t channel);
    10680/** read data from a buffer
    10781
     
    11387
    11488*/
    115 lsmp_t ** lvec_get_data(lvec_t *s);
     89lsmp_t * lvec_get_data(lvec_t *s);
    11690
    11791/** print out lvec data
Note: See TracChangeset for help on using the changeset viewer.