#include "utils_tests.h"
int main (int argc, char **argv)
{
if (argc < 2) {
PRINT_ERR("not enough arguments, running tests\n");
err = run_on_default_sink(main);
PRINT_MSG("usage: %s <output_path> [freq] [samplerate]\n", argv[0]);
return err;
}
if ( argc >= 4 ) samplerate = atoi(argv[3]);
if ( argc >= 3 ) freq = atof(argv[2]);
uint_t duration = 2 * samplerate;
do {
if ( n_frames > duration / 3 && region < 1) {
region++;
}
if ( n_frames > 2 * duration / 3 && region < 2) {
region++;
}
if (duration - n_frames < hop_size * 2 ) {
}
if (duration - n_frames < hop_size ) {
write = duration - n_frames;
} else {
write = hop_size;
}
n_frames += hop_size;
} while ( n_frames <= duration );
return 0;
}
Global aubio include file.
fvec_t * new_fvec(uint_t length)
fvec_t buffer creation function
void del_fvec(fvec_t *s)
fvec_t buffer deletion function
void aubio_cleanup(void)
clean up cached memory at the end of program
void aubio_sink_do(aubio_sink_t *s, fvec_t *write_data, uint_t write)
write monophonic vector of length hop_size to sink
void del_aubio_sink(aubio_sink_t *s)
close sink and cleanup memory
struct _aubio_sink_t aubio_sink_t
media sink object
aubio_sink_t * new_aubio_sink(const char_t *uri, uint_t samplerate)
create new aubio_sink_t
unsigned int uint_t
unsigned integer
float smpl_t
short sample format (32 or 64 bits)
aubio_wavetable_t * new_aubio_wavetable(uint_t samplerate, uint_t hop_size)
create new wavetable object
uint_t aubio_wavetable_set_freq(aubio_wavetable_t *o, smpl_t freq)
set wavetable frequency
void aubio_wavetable_do(aubio_wavetable_t *o, const fvec_t *input, fvec_t *output)
process wavetable function
uint_t aubio_wavetable_stop(aubio_wavetable_t *o)
stop wavetable
struct _aubio_wavetable_t aubio_wavetable_t
wavetable object
uint_t aubio_wavetable_play(aubio_wavetable_t *o)
play sample from start
void del_aubio_wavetable(aubio_wavetable_t *o)
destroy aubio_wavetable_t object