annotate examples/simpletest/simpletest.c @ 110:c8502708853b
- Improvements to SWIG bindings generation script
- Fixed omission in xtract_bark_coefficients that was causing the output to be complete b/s! This fixed bark_coeffs and loudness feature which depends on it
- Changes to descriptor API: added is_delta and id. id corresponds to value in xtract_features_ enum and is useful for programmatic conversions between id and name string.
author |
Jamie Bullock <jamie@postlude.co.uk> |
date |
Tue, 01 Jan 2008 16:17:44 +0000 |
parents |
ff9678537244 |
children |
d9c5cd78abaa |
rev |
line source |
jamie@86
|
1 /* libxtract feature extraction library
|
jamie@86
|
2 *
|
jamie@86
|
3 * Copyright (C) 2006 Jamie Bullock
|
jamie@86
|
4 *
|
jamie@86
|
5 * This program is free software; you can redistribute it and/or modify
|
jamie@86
|
6 * it under the terms of the GNU General Public License as published by
|
jamie@86
|
7 * the Free Software Foundation; either version 2 of the License, or
|
jamie@86
|
8 * (at your option) any later version.
|
jamie@86
|
9 *
|
jamie@86
|
10 * This program is distributed in the hope that it will be useful,
|
jamie@86
|
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
jamie@86
|
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
jamie@86
|
13 * GNU General Public License for more details.
|
jamie@86
|
14 *
|
jamie@86
|
15 * You should have received a copy of the GNU General Public License
|
jamie@86
|
16 * along with this program; if not, write to the Free Software
|
jamie@86
|
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
jamie@86
|
18 * USA.
|
jamie@86
|
19 */
|
jamie@29
|
20
|
jamie@29
|
21 #include "xtract/libxtract.h"
|
jamie@29
|
22 #include <stdio.h>
|
jamie@29
|
23
|
jamie@86
|
24 int main(void) {
|
jamie@29
|
25
|
jamie@29
|
26 float mean = 0, vector[] = {1, 2, 3};
|
jamie@29
|
27
|
jamie@56
|
28 xtract[XTRACT_MEAN]((void *)&vector, 3, NULL, (void *)&mean);
|
jamie@29
|
29
|
jamie@29
|
30 printf("\nThe mean of [1, 2, 3] = %.1f\n\n", mean);
|
jamie@29
|
31
|
jamie@29
|
32 return 0;
|
jamie@29
|
33
|
jamie@29
|
34 }
|