- Timestamp:
- Dec 17, 2013, 5:13:28 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:
- 941c9f9
- Parents:
- 5d10ac1
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/fvec.c
r5d10ac1 rc34336e 37 37 } 38 38 39 void fvec_ write_sample(fvec_t *s, smpl_t data, uint_t position) {39 void fvec_set_sample(fvec_t *s, smpl_t data, uint_t position) { 40 40 s->data[position] = data; 41 41 } 42 42 43 smpl_t fvec_ read_sample(fvec_t *s, uint_t position) {43 smpl_t fvec_get_sample(fvec_t *s, uint_t position) { 44 44 return s->data[position]; 45 45 } … … 59 59 } 60 60 61 void fvec_set (fvec_t *s, smpl_t val) {61 void fvec_set_all (fvec_t *s, smpl_t val) { 62 62 uint_t j; 63 63 for (j=0; j< s->length; j++) { … … 70 70 memset(s->data, 0, s->length * sizeof(smpl_t)); 71 71 #else 72 fvec_set (s, 0.);72 fvec_set_all (s, 0.); 73 73 #endif 74 74 } 75 75 76 76 void fvec_ones(fvec_t *s) { 77 fvec_set (s, 1.);77 fvec_set_all (s, 1.); 78 78 } 79 79 -
src/fvec.h
r5d10ac1 rc34336e 76 76 */ 77 77 fvec_t * new_fvec(uint_t length); 78 78 79 /** fvec_t buffer deletion function 79 80 … … 82 83 */ 83 84 void del_fvec(fvec_t *s); 85 84 86 /** read sample value in a buffer 85 87 … … 92 94 93 95 */ 94 smpl_t fvec_read_sample(fvec_t *s, uint_t position); 96 smpl_t fvec_get_sample(fvec_t *s, uint_t position); 97 95 98 /** write sample value in a buffer 96 99 … … 104 107 105 108 */ 106 void fvec_ write_sample(fvec_t *s, smpl_t data, uint_t position);109 void fvec_set_sample(fvec_t *s, smpl_t data, uint_t position); 107 110 108 111 /** read data from a buffer … … 130 133 131 134 */ 132 void fvec_set (fvec_t *s, smpl_t val);135 void fvec_set_all (fvec_t *s, smpl_t val); 133 136 134 137 /** set all elements to zero
Note: See TracChangeset
for help on using the changeset viewer.