sample.h

Go to the documentation of this file.
00001 /*
00002    Copyright (C) 2003 Paul Brossier
00003 
00004    This program is free software; you can redistribute it and/or modify
00005    it under the terms of the GNU General Public License as published by
00006    the Free Software Foundation; either version 2 of the License, or
00007    (at your option) any later version.
00008 
00009    This program is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012    GNU General Public License for more details.
00013 
00014    You should have received a copy of the GNU General Public License
00015    along with this program; if not, write to the Free Software
00016    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
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 /* _SAMPLE_H */

Generated on Wed Oct 11 17:36:50 2006 for aubio by  doxygen 1.4.7