- Timestamp:
- Dec 17, 2013, 5:20:23 PM (11 years ago)
- 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:
- 4ed0ed1
- Parents:
- 941c9f9
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/fmat.c
r941c9f9 r1ece4f8 49 49 } 50 50 51 void fmat_ write_sample(fmat_t *s, smpl_t data, uint_t channel, uint_t position) {51 void fmat_set_sample(fmat_t *s, smpl_t data, uint_t channel, uint_t position) { 52 52 s->data[channel][position] = data; 53 53 } 54 smpl_t fmat_read_sample(fmat_t *s, uint_t channel, uint_t position) { 54 55 smpl_t fmat_get_sample(fmat_t *s, uint_t channel, uint_t position) { 55 56 return s->data[channel][position]; 56 57 } 57 void fmat_put_channel(fmat_t *s, smpl_t * data, uint_t channel) { 58 s->data[channel] = data; 59 } 58 60 59 void fmat_get_channel(fmat_t *s, uint_t channel, fvec_t *output) { 61 60 output->data = s->data[channel]; 62 61 output->length = s->length; 63 62 return; 63 } 64 65 smpl_t * fmat_get_channel_data(fmat_t *s, uint_t channel) { 66 return s->data[channel]; 64 67 } 65 68 -
src/fmat.h
r941c9f9 r1ece4f8 51 51 */ 52 52 fmat_t * new_fmat(uint_t length, uint_t height); 53 53 54 /** fmat_t buffer deletion function 54 55 … … 57 58 */ 58 59 void del_fmat(fmat_t *s); 60 59 61 /** read sample value in a buffer 60 61 Note that this function is not used in the aubio library, since the same62 result can be obtained using vec->data[channel][position]. Its purpose is to63 access these values from wrappers, as created by swig.64 62 65 63 \param s vector to read from … … 68 66 69 67 */ 70 smpl_t fmat_read_sample(fmat_t *s, uint_t channel, uint_t position); 68 smpl_t fmat_get_sample(fmat_t *s, uint_t channel, uint_t position); 69 71 70 /** write sample value in a buffer 72 73 Note that this function is not used in the aubio library, since the same74 result can be obtained by assigning vec->data[channel][position]. Its purpose75 is to access these values from wrappers, as created by swig.76 71 77 72 \param s vector to write to … … 81 76 82 77 */ 83 void fmat_write_sample(fmat_t *s, smpl_t data, uint_t channel, uint_t position); 78 void fmat_set_sample(fmat_t *s, smpl_t data, uint_t channel, uint_t position); 79 84 80 /** read channel vector from a buffer 85 86 Note that this function is not used in the aubio library, since the same87 result can be obtained with vec->data[channel]. Its purpose is to access88 these values from wrappers, as created by swig.89 81 90 82 \param s vector to read from … … 94 86 */ 95 87 void fmat_get_channel (fmat_t *s, uint_t channel, fvec_t *output); 96 /** write channel vector into a buffer97 88 98 Note that this function is not used in the aubio library, since the same 99 result can be obtained by assigning vec->data[channel]. Its purpose is to 100 access these values from wrappers, as created by swig. 89 /** get vector buffer from an fmat data 101 90 102 \param s vector to write to 103 \param data vector of [length] values to write 104 \param channel channel to write to 91 \param s vector to read from 92 \param channel channel to read from 105 93 106 94 */ 107 void fmat_put_channel(fmat_t *s, smpl_t * data, uint_t channel); 95 smpl_t * fmat_get_channel_data (fmat_t *s, uint_t channel); 96 108 97 /** read data from a buffer 109 110 Note that this function is not used in the aubio library, since the same111 result can be obtained with vec->data. Its purpose is to access these values112 from wrappers, as created by swig.113 98 114 99 \param s vector to read from
Note: See TracChangeset
for help on using the changeset viewer.