From: Paul Brossier Date: Mon, 30 Dec 2013 23:06:20 +0000 (-0400) Subject: examples/: build with -Wmissing-declarations X-Git-Tag: 0.4.1~102^2~11 X-Git-Url: https://git.aubio.org/?p=aubio.git;a=commitdiff_plain;h=d389e23dcdf2f2fd57104a7d5263810ff788250c examples/: build with -Wmissing-declarations --- diff --git a/examples/aubiomfcc.c b/examples/aubiomfcc.c index 02ab75ef..29093fba 100644 --- a/examples/aubiomfcc.c +++ b/examples/aubiomfcc.c @@ -29,8 +29,8 @@ fvec_t * mfcc_out; // to get the output coefficients uint_t n_filters = 40; uint_t n_coefs = 13; -static void -process_block(fvec_t *ibuf, fvec_t *obuf) { +void process_block (fvec_t *ibuf, fvec_t *obuf) +{ fvec_zeros(obuf); //compute mag spectrum aubio_pvoc_do (pv, ibuf, fftgrain); @@ -38,7 +38,8 @@ process_block(fvec_t *ibuf, fvec_t *obuf) { aubio_mfcc_do(mfcc, fftgrain, mfcc_out); } -static void process_print (void) { +void process_print (void) +{ /* output times in seconds and extracted mfccs */ outmsg("%f\t",blocks*hop_size/(float)samplerate); fvec_print(mfcc_out); diff --git a/examples/aubionotes.c b/examples/aubionotes.c index 9b09d0b4..9c015dad 100644 --- a/examples/aubionotes.c +++ b/examples/aubionotes.c @@ -45,8 +45,8 @@ fvec_t *pitch_obuf; void note_append (fvec_t * note_buffer, smpl_t curnote); uint_t get_note (fvec_t * note_buffer, fvec_t * note_buffer2); -static void -process_block(fvec_t *ibuf, fvec_t *obuf) { +void process_block (fvec_t *ibuf, fvec_t *obuf) +{ fvec_zeros(obuf); aubio_onset_do(o, ibuf, onset); @@ -94,8 +94,8 @@ process_block(fvec_t *ibuf, fvec_t *obuf) { } } -static void -process_print (void) { +void process_print (void) +{ //if (verbose) outmsg("%f\n",pitch_obuf->data[0]); } diff --git a/examples/aubioonset.c b/examples/aubioonset.c index 814dea9c..52d18b18 100644 --- a/examples/aubioonset.c +++ b/examples/aubioonset.c @@ -29,8 +29,8 @@ aubio_wavetable_t *wavetable; fvec_t *onset; smpl_t is_onset; -void -process_block(fvec_t *ibuf, fvec_t *obuf) { +void process_block(fvec_t *ibuf, fvec_t *obuf) +{ aubio_onset_do (o, ibuf, onset); is_onset = fvec_get_sample(onset, 0); if ( !usejack && ! sink_uri ) return; @@ -46,8 +46,7 @@ process_block(fvec_t *ibuf, fvec_t *obuf) { aubio_wavetable_do (wavetable, obuf, obuf); } -void -process_print (void) +void process_print (void) { if ( is_onset ) { outmsg ("%f\n", aubio_onset_get_last_s (o) ); diff --git a/examples/aubiopitch.c b/examples/aubiopitch.c index f960b495..5dac47a3 100644 --- a/examples/aubiopitch.c +++ b/examples/aubiopitch.c @@ -28,8 +28,8 @@ aubio_pitch_t *o; aubio_wavetable_t *wavetable; fvec_t *pitch; -void -process_block(fvec_t * ibuf, fvec_t * obuf) { +void process_block(fvec_t * ibuf, fvec_t * obuf) +{ aubio_pitch_do (o, ibuf, pitch); if ( !usejack && ! sink_uri ) return; fvec_zeros(obuf); @@ -42,8 +42,8 @@ process_block(fvec_t * ibuf, fvec_t * obuf) { aubio_wavetable_do (wavetable, obuf, obuf); } -void -process_print (void) { +void process_print (void) +{ smpl_t pitch_found = fvec_get_sample(pitch, 0); outmsg("%f %f\n",(blocks) *hop_size/(float)samplerate, pitch_found); diff --git a/examples/aubioquiet.c b/examples/aubioquiet.c index ba0d71d9..bfdd3fc2 100644 --- a/examples/aubioquiet.c +++ b/examples/aubioquiet.c @@ -36,7 +36,7 @@ void process_block(fvec_t * ibuf, fvec_t * obuf) { } } -static void process_print (void) { +void process_print (void) { int curblocks = (blocks - 4) > 0 ? blocks - 4 : 0; if (issilence == -1) { outmsg("NOISY: %f\n",curblocks*hop_size/(float)samplerate); diff --git a/examples/parse_args.h b/examples/parse_args.h index f3c3b618..3636e18f 100644 --- a/examples/parse_args.h +++ b/examples/parse_args.h @@ -47,6 +47,7 @@ extern void examples_common_init (int argc, char **argv); extern void examples_common_del (void); extern void examples_common_process (aubio_process_func_t process_func, aubio_print_func_t print); +int parse_args (int argc, char **argv); // internal stuff extern int blocks; @@ -56,8 +57,9 @@ extern fvec_t *obuf; const char *prog_name; -void -usage (FILE * stream, int exit_code) +void usage (FILE * stream, int exit_code); + +void usage (FILE * stream, int exit_code) { fprintf (stream, "usage: %s [ options ] \n", prog_name); fprintf (stream, diff --git a/examples/utils.c b/examples/utils.c index 6fc64257..90687911 100644 --- a/examples/utils.c +++ b/examples/utils.c @@ -72,8 +72,12 @@ extern int parse_args (int argc, char **argv); aubio_jack_t *jack_setup; #endif -void -examples_common_init (int argc, char **argv) +void examples_common_init (int argc, char **argv); +void examples_common_del (void); +void examples_common_process (aubio_process_func_t process_func, + aubio_print_func_t print); + +void examples_common_init (int argc, char **argv) { /* parse command line arguments */ @@ -115,8 +119,7 @@ examples_common_init (int argc, char **argv) } -void -examples_common_del (void) +void examples_common_del (void) { del_fvec (ibuf); del_fvec (obuf); @@ -125,8 +128,7 @@ examples_common_del (void) fflush(stdout); } -void -examples_common_process (aubio_process_func_t process_func, +void examples_common_process (aubio_process_func_t process_func, aubio_print_func_t print) { diff --git a/examples/utils.h b/examples/utils.h index 61a01bf7..0ce67bba 100644 --- a/examples/utils.h +++ b/examples/utils.h @@ -53,3 +53,6 @@ void send_noteon (int pitch, int velo); /** common process function */ typedef int (*aubio_process_func_t) (fvec_t * input, fvec_t * output); + +void process_block (fvec_t *ibuf, fvec_t *obuf); +void process_print (void);