Changeset c7860af for src/fvec.h


Ignore:
Timestamp:
Dec 4, 2009, 1:32:43 AM (10 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, 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/fvec.h

    rc6d0169 rc7860af  
    3838typedef struct {
    3939  uint_t length;   /**< length of buffer */
    40   uint_t channels; /**< number of channels */
    41   smpl_t **data;   /**< data array of size [length] * [channels] */
     40  smpl_t *data;   /**< data array of size [length] */
    4241} fvec_t;
    4342
     
    4544
    4645  \param length the length of the buffer to create
    47   \param channels the number of channels in the buffer
    4846
    4947*/
    50 fvec_t * new_fvec(uint_t length, uint_t channels);
     48fvec_t * new_fvec(uint_t length);
    5149/** fvec_t buffer deletion function
    5250
     
    5856
    5957  Note that this function is not used in the aubio library, since the same
    60   result can be obtained using vec->data[channel][position]. Its purpose is to
     58  result can be obtained using vec->data[position]. Its purpose is to
    6159  access these values from wrappers, as created by swig.
    6260
    6361  \param s vector to read from
    64   \param channel channel to read from
    6562  \param position sample position to read from
    6663
    6764*/
    68 smpl_t fvec_read_sample(fvec_t *s, uint_t channel, uint_t position);
     65smpl_t fvec_read_sample(fvec_t *s, uint_t position);
    6966/** write sample value in a buffer
    7067
    7168  Note that this function is not used in the aubio library, since the same
    72   result can be obtained by assigning vec->data[channel][position]. Its purpose
     69  result can be obtained by assigning vec->data[position]. Its purpose
    7370  is to access these values from wrappers, as created by swig.
    7471
    7572  \param s vector to write to
    76   \param data value to write in s->data[channel][position]
    77   \param channel channel to write to
     73  \param data value to write in s->data[position]
    7874  \param position sample position to write to
    7975
    8076*/
    81 void  fvec_write_sample(fvec_t *s, smpl_t data, uint_t channel, uint_t position);
    82 /** read channel vector from a buffer
     77void  fvec_write_sample(fvec_t *s, smpl_t data, uint_t position);
    8378
    84   Note that this function is not used in the aubio library, since the same
    85   result can be obtained with vec->data[channel]. Its purpose is to access
    86   these values from wrappers, as created by swig.
    87 
    88   \param s vector to read from
    89   \param channel channel to read from
    90 
    91 */
    92 smpl_t * fvec_get_channel(fvec_t *s, uint_t channel);
    93 /** write channel vector into a buffer
    94 
    95   Note that this function is not used in the aubio library, since the same
    96   result can be obtained by assigning vec->data[channel]. Its purpose is to
    97   access these values from wrappers, as created by swig.
    98 
    99   \param s vector to write to
    100   \param data vector of [length] values to write
    101   \param channel channel to write to
    102 
    103 */
    104 void fvec_put_channel(fvec_t *s, smpl_t * data, uint_t channel);
    10579/** read data from a buffer
    10680
     
    11286
    11387*/
    114 smpl_t ** fvec_get_data(fvec_t *s);
     88smpl_t * fvec_get_data(fvec_t *s);
    11589
    11690/** print out fvec data
Note: See TracChangeset for help on using the changeset viewer.