AUBIO_FREE(s);
}
-void fmat_write_sample(fmat_t *s, smpl_t data, uint_t channel, uint_t position) {
+void fmat_set_sample(fmat_t *s, smpl_t data, uint_t channel, uint_t position) {
s->data[channel][position] = data;
}
-smpl_t fmat_read_sample(fmat_t *s, uint_t channel, uint_t position) {
+
+smpl_t fmat_get_sample(fmat_t *s, uint_t channel, uint_t position) {
return s->data[channel][position];
}
-void fmat_put_channel(fmat_t *s, smpl_t * data, uint_t channel) {
- s->data[channel] = data;
-}
+
void fmat_get_channel(fmat_t *s, uint_t channel, fvec_t *output) {
output->data = s->data[channel];
output->length = s->length;
return;
}
+smpl_t * fmat_get_channel_data(fmat_t *s, uint_t channel) {
+ return s->data[channel];
+}
+
smpl_t ** fmat_get_data(fmat_t *s) {
return s->data;
}
*/
fmat_t * new_fmat(uint_t length, uint_t height);
+
/** fmat_t buffer deletion function
\param s buffer to delete as returned by new_fmat()
*/
void del_fmat(fmat_t *s);
-/** read sample value in a buffer
- Note that this function is not used in the aubio library, since the same
- result can be obtained using vec->data[channel][position]. Its purpose is to
- access these values from wrappers, as created by swig.
+/** read sample value in a buffer
\param s vector to read from
\param channel channel to read from
\param position sample position to read from
*/
-smpl_t fmat_read_sample(fmat_t *s, uint_t channel, uint_t position);
-/** write sample value in a buffer
+smpl_t fmat_get_sample(fmat_t *s, uint_t channel, uint_t position);
- Note that this function is not used in the aubio library, since the same
- result can be obtained by assigning vec->data[channel][position]. Its purpose
- is to access these values from wrappers, as created by swig.
+/** write sample value in a buffer
\param s vector to write to
\param data value to write in s->data[channel][position]
\param position sample position to write to
*/
-void fmat_write_sample(fmat_t *s, smpl_t data, uint_t channel, uint_t position);
-/** read channel vector from a buffer
+void fmat_set_sample(fmat_t *s, smpl_t data, uint_t channel, uint_t position);
- Note that this function is not used in the aubio library, since the same
- result can be obtained with vec->data[channel]. Its purpose is to access
- these values from wrappers, as created by swig.
+/** read channel vector from a buffer
\param s vector to read from
\param channel channel to read from
*/
void fmat_get_channel (fmat_t *s, uint_t channel, fvec_t *output);
-/** write channel vector into a buffer
- Note that this function is not used in the aubio library, since the same
- result can be obtained by assigning vec->data[channel]. Its purpose is to
- access these values from wrappers, as created by swig.
+/** get vector buffer from an fmat data
- \param s vector to write to
- \param data vector of [length] values to write
- \param channel channel to write to
+ \param s vector to read from
+ \param channel channel to read from
*/
-void fmat_put_channel(fmat_t *s, smpl_t * data, uint_t channel);
-/** read data from a buffer
+smpl_t * fmat_get_channel_data (fmat_t *s, uint_t channel);
- Note that this function is not used in the aubio library, since the same
- result can be obtained with vec->data. Its purpose is to access these values
- from wrappers, as created by swig.
+/** read data from a buffer
\param s vector to read from