Mercurial > hg > libxtract
comparison examples/puredata/xtract~.c @ 55:4ea1a8838b14
Finished the essentials of descriptors.c
author | Jamie Bullock <jamie@postlude.co.uk> |
---|---|
date | Sun, 21 Jan 2007 14:40:23 +0000 |
parents | 9762d7e3d129 |
children | 450712b21565 |
comparison
equal
deleted
inserted
replaced
54:9762d7e3d129 | 55:4ea1a8838b14 |
---|---|
103 | 103 |
104 t_symbol *tmp; | 104 t_symbol *tmp; |
105 t_xtract_tilde *x = (t_xtract_tilde *)pd_new(xtract_class); | 105 t_xtract_tilde *x = (t_xtract_tilde *)pd_new(xtract_class); |
106 xtract_mel_filter *mf; | 106 xtract_mel_filter *mf; |
107 t_int n, N, f, F, n_args, type; | 107 t_int n, N, f, F, n_args, type; |
108 t_float *argv_max; | |
108 t_function_descriptor *fd; | 109 t_function_descriptor *fd; |
109 char *p_name, *p_desc, *author; | 110 char *p_name, *p_desc, *author; |
110 int *year; | 111 int *year; |
111 | 112 |
112 p_name = p_desc = author = NULL; | 113 p_name = p_desc = author = NULL; |
136 /* allocate memory for feature arguments */ | 137 /* allocate memory for feature arguments */ |
137 n_args = fd[f].argc; | 138 n_args = fd[f].argc; |
138 type = fd[f].argv.type; | 139 type = fd[f].argv.type; |
139 | 140 |
140 if(n_args){ | 141 if(n_args){ |
142 for(n = 0; n < n_args; n++){ | |
143 argv_max = &fd[f].argv.max[n]; | |
144 post("Argument %d, max: %.2f", n, *argv_max); | |
145 } | |
141 if(type == MEL_FILTER){ | 146 if(type == MEL_FILTER){ |
142 x->memory.argv = (size_t)(n_args * sizeof(xtract_mel_filter)); | 147 x->memory.argv = (size_t)(n_args * sizeof(xtract_mel_filter)); |
143 x->argv = (xtract_mel_filter *)getbytes(x->memory.argv); | 148 x->argv = (xtract_mel_filter *)getbytes(x->memory.argv); |
144 } | 149 } |
145 else if(type == INT){ | 150 else if(type == INT){ |