ref: 79b51e588d41bc7df8c27f1f1aee57832a9d45ad
dir: /test/p/p_pitchamdf.c/
#include <stdlib.h> #include <stdio.h> #include "soundpipe.h" #include "config.h" int main() { sp_data *sp; sp_create(&sp); sp_srand(sp, 12345); sp->sr = SR; sp->len = sp->sr * LEN; uint32_t t, u; SPFLOAT in = 0, rms = 0, cps = 0; sp_pitchamdf *unit[NUM]; for(u = 0; u < NUM; u++) { sp_pitchamdf_create(&unit[u]); sp_pitchamdf_init(sp, unit[u], 100, 400); } for(t = 0; t < sp->len; t++) { for(u = 0; u < NUM; u++) sp_pitchamdf_compute(sp, unit[u], &in, &cps, &rms); } for(u = 0; u < NUM; u++) sp_pitchamdf_destroy(&unit[u]); sp_destroy(&sp); return 0; }