#include "utils_tests.h"
int main (int argc, char **argv)
{
if (argc < 3) {
err = 2;
PRINT_ERR("not enough arguments\n");
PRINT_MSG("usage: %s <input_path> <output_path> [samplerate] [hop_size]\n", argv[0]);
return err;
}
char_t *source_path = argv[1];
if ( argc >= 4 ) samplerate = atoi(argv[3]);
if ( argc >= 5 ) hop_size = atoi(argv[4]);
if ( argc >= 6 ) {
err = 2;
PRINT_ERR("too many arguments\n");
return err;
}
if (!vec) { err = 1; goto beach_fvec; }
if (!i) { err = 1; goto beach_source; }
if (!o) { err = 1; goto beach_sink; }
uint_t n_frames = 0, read = 0;
do {
n_frames += read;
} while ( read == hop_size );
PRINT_MSG("read %d frames at %dHz (%d blocks) from %s written to %s\n",
n_frames, samplerate, n_frames / hop_size,
source_path, sink_path);
beach_sink:
beach_source:
beach_fvec:
return err;
}