aboutsummaryrefslogtreecommitdiff
path: root/examples/simpletest
diff options
context:
space:
mode:
authorJamie Bullock <jamie@jamiebullock.com>2013-03-14 13:03:12 +0000
committerJamie Bullock <jamie@jamiebullock.com>2013-03-14 13:03:12 +0000
commit7c834282338f48093d88a0c44a83ee311b8aa739 (patch)
treec3f7433ced30f2524164e4d39082ed05c0ec72de /examples/simpletest
parenta3e9f7452bae04608d8d6e6ab9042cbc9dc10b9d (diff)
downloadLibXtract-7c834282338f48093d88a0c44a83ee311b8aa739.tar.gz
LibXtract-7c834282338f48093d88a0c44a83ee311b8aa739.tar.bz2
LibXtract-7c834282338f48093d88a0c44a83ee311b8aa739.zip
Add explicit casts to malloc() calls for C++ compatibility
Diffstat (limited to 'examples/simpletest')
-rw-r--r--examples/simpletest/simpletest.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/simpletest/simpletest.c b/examples/simpletest/simpletest.c
index 7b6cb22..6b5ee30 100644
--- a/examples/simpletest/simpletest.c
+++ b/examples/simpletest/simpletest.c
@@ -71,10 +71,10 @@ int main(void)
/* compute the MFCCs */
mel_filters.n_filters = MFCC_FREQ_BANDS;
- mel_filters.filters = malloc(MFCC_FREQ_BANDS * sizeof(double *));
+ mel_filters.filters = (double **)malloc(MFCC_FREQ_BANDS * sizeof(double *));
for(n = 0; n < MFCC_FREQ_BANDS; ++n)
{
- mel_filters.filters[n] = malloc(BLOCKSIZE * sizeof(double));
+ mel_filters.filters[n] = (double *)malloc(BLOCKSIZE * sizeof(double));
}
xtract_init_mfcc(BLOCKSIZE >> 1, SAMPLERATE >> 1, XTRACT_EQUAL_GAIN, MFCC_FREQ_MIN, MFCC_FREQ_MAX, mel_filters.n_filters, mel_filters.filters);