From 029bf4e8ccfb5c3e74de9d6cd45d258b7f8d772d Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Mon, 30 Dec 2013 19:10:58 -0400 Subject: [PATCH] src/: build with -Wmissing-declarations --- src/io/source_avcodec.c | 1 + src/spectral/ooura_fft8g.c | 22 +++++++++++++++++++++- src/spectral/statistics.c | 21 +++++++++++++++++++++ src/tempo/tempo.c | 21 +++++++++++++++++++++ 4 files changed, 64 insertions(+), 1 deletion(-) diff --git a/src/io/source_avcodec.c b/src/io/source_avcodec.c index a303251b..fbc1cd2a 100644 --- a/src/io/source_avcodec.c +++ b/src/io/source_avcodec.c @@ -61,6 +61,7 @@ struct _aubio_source_avcodec_t { // hack to create or re-create the context the first time _do or _do_multi is called void aubio_source_avcodec_reset_resampler(aubio_source_avcodec_t * s, uint_t multi); +void aubio_source_avcodec_readframe(aubio_source_avcodec_t *s, uint_t * read_samples); aubio_source_avcodec_t * new_aubio_source_avcodec(char_t * path, uint_t samplerate, uint_t hop_size) { aubio_source_avcodec_t * s = AUBIO_NEW(aubio_source_avcodec_t); diff --git a/src/spectral/ooura_fft8g.c b/src/spectral/ooura_fft8g.c index fefe0368..a016c9b3 100644 --- a/src/spectral/ooura_fft8g.c +++ b/src/spectral/ooura_fft8g.c @@ -1,9 +1,29 @@ -// 2 modifications made for aubio: +// modifications made for aubio: // - replace all 'double' with 'smpl_t' // - include "aubio_priv.h" (for config.h and types.h) +// - add missing prototypes #include "aubio_priv.h" +void cdft(int n, int isgn, smpl_t *a, int *ip, smpl_t *w); +void rdft(int n, int isgn, smpl_t *a, int *ip, smpl_t *w); +void ddct(int n, int isgn, smpl_t *a, int *ip, smpl_t *w); +void ddst(int n, int isgn, smpl_t *a, int *ip, smpl_t *w); +void dfct(int n, smpl_t *a, smpl_t *t, int *ip, smpl_t *w); +void dfst(int n, smpl_t *a, smpl_t *t, int *ip, smpl_t *w); +void makewt(int nw, int *ip, smpl_t *w); +void makect(int nc, int *ip, smpl_t *c); +void bitrv2(int n, int *ip, smpl_t *a); +void bitrv2conj(int n, int *ip, smpl_t *a); +void cftfsub(int n, smpl_t *a, smpl_t *w); +void cftbsub(int n, smpl_t *a, smpl_t *w); +void cft1st(int n, smpl_t *a, smpl_t *w); +void cftmdl(int n, int l, smpl_t *a, smpl_t *w); +void rftfsub(int n, smpl_t *a, int nc, smpl_t *c); +void rftbsub(int n, smpl_t *a, int nc, smpl_t *c); +void dctsub(int n, smpl_t *a, int nc, smpl_t *c); +void dstsub(int n, smpl_t *a, int nc, smpl_t *c); + /* Fast Fourier/Cosine/Sine Transform dimension :one diff --git a/src/spectral/statistics.c b/src/spectral/statistics.c index 87cf4869..fd25f0ab 100644 --- a/src/spectral/statistics.c +++ b/src/spectral/statistics.c @@ -22,6 +22,27 @@ #include "cvec.h" #include "spectral/specdesc.h" +void aubio_specdesc_centroid (aubio_specdesc_t * o, cvec_t * spec, + fvec_t * desc); +void aubio_specdesc_spread (aubio_specdesc_t * o, cvec_t * spec, + fvec_t * desc); +void aubio_specdesc_skewness (aubio_specdesc_t * o, cvec_t * spec, + fvec_t * desc); +void aubio_specdesc_kurtosis (aubio_specdesc_t * o, cvec_t * spec, + fvec_t * desc); +void aubio_specdesc_slope (aubio_specdesc_t * o, cvec_t * spec, + fvec_t * desc); +void aubio_specdesc_decrease (aubio_specdesc_t * o, cvec_t * spec, + fvec_t * desc); +void aubio_specdesc_rolloff (aubio_specdesc_t * o, cvec_t * spec, + fvec_t * desc); + + +smpl_t cvec_sum (cvec_t * s); +smpl_t cvec_mean (cvec_t * s); +smpl_t cvec_centroid (cvec_t * s); +smpl_t cvec_moment (cvec_t * s, uint_t moment); + smpl_t cvec_sum (cvec_t * s) { diff --git a/src/tempo/tempo.c b/src/tempo/tempo.c index bb6e84b6..cfe7d62c 100644 --- a/src/tempo/tempo.c +++ b/src/tempo/tempo.c @@ -28,6 +28,27 @@ #include "mathutils.h" #include "tempo/tempo.h" +// TODO implement get/set_delay + +/** set current delay + + \param o beat tracking object + + \return current delay, in samples + + */ +uint_t aubio_tempo_get_delay(aubio_tempo_t * o); + +/** set current delay + + \param o beat tracking object + \param delay delay to set tempo to, in samples + + \return `0` if successful, non-zero otherwise + + */ +uint_t aubio_tempo_set_delay(aubio_tempo_t * o, uint_t delay); + /* structure to store object state */ struct _aubio_tempo_t { aubio_specdesc_t * od; /** onset detection */ -- 2.11.0