ref: d389e23dcdf2f2fd57104a7d5263810ff788250c
parent: 2b43a9ecb669387ed0d7fab4dc2df75e90cfc704
author: Paul Brossier <piem@piem.org>
date: Mon Dec 30 14:06:20 EST 2013
examples/: build with -Wmissing-declarations
--- a/examples/aubiomfcc.c
+++ b/examples/aubiomfcc.c
@@ -29,8 +29,8 @@
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 @@
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);
--- a/examples/aubionotes.c
+++ b/examples/aubionotes.c
@@ -45,8 +45,8 @@
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 @@
}
}
-static void
-process_print (void) {
+void process_print (void)
+{
//if (verbose) outmsg("%f\n",pitch_obuf->data[0]);
}
--- a/examples/aubioonset.c
+++ b/examples/aubioonset.c
@@ -29,8 +29,8 @@
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 @@
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) );
--- a/examples/aubiopitch.c
+++ b/examples/aubiopitch.c
@@ -28,8 +28,8 @@
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 @@
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);
--- a/examples/aubioquiet.c
+++ b/examples/aubioquiet.c
@@ -36,7 +36,7 @@
}
}
-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);
--- a/examples/parse_args.h
+++ b/examples/parse_args.h
@@ -47,6 +47,7 @@
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 @@
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,
--- a/examples/utils.c
+++ b/examples/utils.c
@@ -72,8 +72,12 @@
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 @@
}
-void
-examples_common_del (void)
+void examples_common_del (void)
{
del_fvec (ibuf);
del_fvec (obuf);
@@ -125,8 +128,7 @@
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)
{
--- a/examples/utils.h
+++ b/examples/utils.h
@@ -53,3 +53,6 @@
/** 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);