#include "utils.h"
#define PROG_HAS_PITCH 1
#define PROG_HAS_OUTPUT 1
#define PROG_HAS_SILENCE 1
#define PROG_HAS_JACK 1
#include "parse_args.h"
{
if ( !usejack && ! sink_uri ) return;
if (mix_input)
else
}
void process_print (void)
{
print_time(blocks * hop_size);
outmsg(" %f\n", pitch_found);
}
int main(int argc, char **argv) {
int ret = 0;
buffer_size = 2048;
examples_common_init(argc,argv);
verbmsg ("using source: %s at %dHz\n", source_uri, samplerate);
verbmsg ("pitch method: %s, ", pitch_method);
verbmsg ("pitch unit: %s, ", pitch_unit);
verbmsg ("buffer_size: %d, ", buffer_size);
verbmsg ("hop_size: %d, ", hop_size);
verbmsg ("tolerance: %f\n", pitch_tolerance);
if (o == NULL) { ret = 1; goto beach; }
if (pitch_tolerance != 0.)
if (silence_threshold != -90.)
if (pitch_unit != NULL)
examples_common_process(process_block, process_print);
beach:
examples_common_del();
return ret;
}