#include "utils_tests.h"
int test_wrong_params(void);
int main (int argc, char** argv)
{
if (argc < 2) {
err = 2;
PRINT_WRN("no arguments, running tests\n");
err = test_wrong_params();
PRINT_MSG("usage: %s <input_path> [samplerate] [hop_size]\n", argv[0]);
return err;
}
char_t *source_path = argv[1];
if ( argc >= 3 ) samplerate = atoi(argv[2]);
if ( argc >= 4 ) hop_s = atoi(argv[3]);
win_s = 2 * hop_s;
if (!in || !fftgrain || !out) { err = 1; goto failure; }
if (!source) { err = 1; goto failure; }
if (!pv) { err = 1; goto failure; }
if (!mfcc) { err = 1; goto failure; }
do {
} while (read == hop_s);
failure:
if (mfcc)
if (pv)
if (source)
if (in)
if (fftgrain)
if (out)
return err;
}
int test_wrong_params()
{
return run_on_default_source(main);
}
Global aubio include file.
cvec_t * new_cvec(uint_t length)
cvec_t buffer creation function
void del_cvec(cvec_t *s)
cvec_t buffer deletion function
fvec_t * new_fvec(uint_t length)
fvec_t buffer creation function
void del_fvec(fvec_t *s)
fvec_t buffer deletion function
void fvec_print(const fvec_t *s)
print out fvec data
void aubio_mfcc_do(aubio_mfcc_t *mf, const cvec_t *in, fvec_t *out)
mfcc object processing
void del_aubio_mfcc(aubio_mfcc_t *mf)
delete mfcc object
aubio_mfcc_t * new_aubio_mfcc(uint_t buf_size, uint_t n_filters, uint_t n_coeffs, uint_t samplerate)
create mfcc object
struct _aubio_mfcc_t aubio_mfcc_t
mfcc object
void aubio_cleanup(void)
clean up cached memory at the end of program
struct _aubio_pvoc_t aubio_pvoc_t
phasevocoder object
void aubio_pvoc_do(aubio_pvoc_t *pv, const fvec_t *in, cvec_t *fftgrain)
compute spectral frame
aubio_pvoc_t * new_aubio_pvoc(uint_t win_s, uint_t hop_s)
create phase vocoder object
void del_aubio_pvoc(aubio_pvoc_t *pv)
delete phase vocoder object
uint_t aubio_source_get_samplerate(aubio_source_t *s)
get samplerate of source object
struct _aubio_source_t aubio_source_t
media source object
aubio_source_t * new_aubio_source(const char_t *uri, uint_t samplerate, uint_t hop_size)
create new aubio_source_t
void del_aubio_source(aubio_source_t *s)
close source and cleanup memory
void aubio_source_do(aubio_source_t *s, fvec_t *read_to, uint_t *read)
read monophonic vector of length hop_size from source object
Vector of real-valued phase and spectrum data.
unsigned int uint_t
unsigned integer
float smpl_t
short sample format (32 or 64 bits)