NcLooper/audio/t.c

57 lines
1.1 KiB
C

/*
* NcLooper test des fonctions audio
*/
#include <stdio.h>
#include <unistd.h>
#include <ao/ao.h>
#include "ao_output.h"
#include "playfile.h"
/* --------------------------------------------------------------------- */
int verbosity;
/* --------------------------------------------------------------------- */
void help(int k)
{
}
/* --------------------------------------------------------------------- */
int main(int argc, char *argv[])
{
int foo;
ao_device *device;
int opt;
while ((opt = getopt(argc, argv, "hv")) != -1) {
switch(opt) {
case 'h': help(0); break;
case 'v': verbosity++; break;
}
}
#if DEBUG_LEVEL
fprintf(stderr, "argc = %d, optind = %d\n", argc, optind);
#endif
device = init_ao_output(44100);
fprintf(stderr, "AO init -> %p\n", device);
foo = play_some_stuff(device, 0);
fprintf(stderr, "play stuff -> %d\n", foo);
foo = blast_this_file("AK14V-ORDRES.wav", device, 3);
fprintf(stderr, "blast file -> %d\n", foo);
foo = close_ao_output(device);
fprintf(stderr, "AO close -> %d\n", foo);
return 0;
}
/* --------------------------------------------------------------------- */