Changeset 7c206df


Ignore:
Timestamp:
Feb 28, 2006, 8:30:11 AM (19 years ago)
Author:
Paul Brossier <piem@altern.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:
431e9d8
Parents:
d3efa4e
Message:

[src,swig] added cvec methods to sample
[src,swig] added cvec methods to sample

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/sample.c

    rd3efa4e r7c206df  
    9090  AUBIO_FREE(s);
    9191}
     92
     93void cvec_write_norm(cvec_t *s, smpl_t data, uint_t channel, uint_t position) {
     94  s->norm[channel][position] = data;
     95}
     96void cvec_write_phas(cvec_t *s, smpl_t data, uint_t channel, uint_t position) {
     97  s->phas[channel][position] = data;
     98}
     99smpl_t cvec_read_norm(cvec_t *s, uint_t channel, uint_t position) {
     100  return s->norm[channel][position];
     101}
     102smpl_t cvec_read_phas(cvec_t *s, uint_t channel, uint_t position) {
     103  return s->phas[channel][position];
     104}
     105void cvec_put_norm_channel(cvec_t *s, smpl_t * data, uint_t channel) {
     106  s->norm[channel] = data;
     107}
     108void cvec_put_phas_channel(cvec_t *s, smpl_t * data, uint_t channel) {
     109  s->phas[channel] = data;
     110}
     111smpl_t * cvec_get_norm_channel(cvec_t *s, uint_t channel) {
     112  return s->norm[channel];
     113}
     114smpl_t * cvec_get_phas_channel(cvec_t *s, uint_t channel) {
     115  return s->phas[channel];
     116}
     117smpl_t ** cvec_get_norm(cvec_t *s) {
     118  return s->norm;
     119}
     120smpl_t ** cvec_get_phas(cvec_t *s) {
     121  return s->phas;
     122}
  • src/sample.h

    rd3efa4e r7c206df  
    7272smpl_t ** fvec_get_data(fvec_t *s);
    7373void fvec_put_channel(fvec_t *s, smpl_t * data, uint_t channel);
     74
    7475extern cvec_t * new_cvec(uint_t length, uint_t channels);
    7576extern void del_cvec(cvec_t *s);
     77void cvec_write_norm(cvec_t *s, smpl_t data, uint_t channel, uint_t position);
     78void cvec_write_phas(cvec_t *s, smpl_t data, uint_t channel, uint_t position);
     79smpl_t cvec_read_norm(cvec_t *s, uint_t channel, uint_t position);
     80smpl_t cvec_read_phas(cvec_t *s, uint_t channel, uint_t position);
     81void cvec_put_norm_channel(cvec_t *s, smpl_t * data, uint_t channel);
     82void cvec_put_phas_channel(cvec_t *s, smpl_t * data, uint_t channel);
     83smpl_t * cvec_get_norm_channel(cvec_t *s, uint_t channel);
     84smpl_t * cvec_get_phas_channel(cvec_t *s, uint_t channel);
     85smpl_t ** cvec_get_norm(cvec_t *s);
     86smpl_t ** cvec_get_phas(cvec_t *s);
    7687
    7788#ifdef __cplusplus
  • swig/aubio.i

    rd3efa4e r7c206df  
    4949extern cvec_t * new_cvec(uint_t length, uint_t channels);
    5050extern void del_cvec(cvec_t *s);
     51extern void cvec_write_norm(cvec_t *s, smpl_t data, uint_t channel, uint_t position);
     52extern void cvec_write_phas(cvec_t *s, smpl_t data, uint_t channel, uint_t position);
     53extern smpl_t cvec_read_norm(cvec_t *s, uint_t channel, uint_t position);
     54extern smpl_t cvec_read_phas(cvec_t *s, uint_t channel, uint_t position);
     55extern void cvec_put_norm_channel(cvec_t *s, smpl_t * data, uint_t channel);
     56extern void cvec_put_phas_channel(cvec_t *s, smpl_t * data, uint_t channel);
     57extern smpl_t * cvec_get_norm_channel(cvec_t *s, uint_t channel);
     58extern smpl_t * cvec_get_phas_channel(cvec_t *s, uint_t channel);
     59extern smpl_t ** cvec_get_norm(cvec_t *s);
     60extern smpl_t ** cvec_get_phas(cvec_t *s);
    5161
    5262
Note: See TracChangeset for help on using the changeset viewer.