00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _SAMPLE_H
00021 #define _SAMPLE_H
00022
00023 #ifdef __cplusplus
00024 extern "C" {
00025 #endif
00026
00038 typedef struct _fvec_t fvec_t;
00040 typedef struct _cvec_t cvec_t;
00042 struct _fvec_t {
00043 uint_t length;
00044 uint_t channels;
00045 smpl_t **data;
00046 };
00048 struct _cvec_t {
00049 uint_t length;
00050 uint_t channels;
00051 smpl_t **norm;
00052 smpl_t **phas;
00053 };
00060 fvec_t * new_fvec(uint_t length, uint_t channels);
00066 void del_fvec(fvec_t *s);
00078 smpl_t fvec_read_sample(fvec_t *s, uint_t channel, uint_t position);
00091 void fvec_write_sample(fvec_t *s, smpl_t data, uint_t channel, uint_t position);
00102 smpl_t * fvec_get_channel(fvec_t *s, uint_t channel);
00114 void fvec_put_channel(fvec_t *s, smpl_t * data, uint_t channel);
00124 smpl_t ** fvec_get_data(fvec_t *s);
00125
00138 cvec_t * new_cvec(uint_t length, uint_t channels);
00144 void del_cvec(cvec_t *s);
00157 void cvec_write_norm(cvec_t *s, smpl_t data, uint_t channel, uint_t position);
00170 void cvec_write_phas(cvec_t *s, smpl_t data, uint_t channel, uint_t position);
00182 smpl_t cvec_read_norm(cvec_t *s, uint_t channel, uint_t position);
00194 smpl_t cvec_read_phas(cvec_t *s, uint_t channel, uint_t position);
00206 void cvec_put_norm_channel(cvec_t *s, smpl_t * data, uint_t channel);
00218 void cvec_put_phas_channel(cvec_t *s, smpl_t * data, uint_t channel);
00229 smpl_t * cvec_get_norm_channel(cvec_t *s, uint_t channel);
00240 smpl_t * cvec_get_phas_channel(cvec_t *s, uint_t channel);
00250 smpl_t ** cvec_get_norm(cvec_t *s);
00260 smpl_t ** cvec_get_phas(cvec_t *s);
00261
00262 #ifdef __cplusplus
00263 }
00264 #endif
00265
00266 #endif