NcLooper/audio/t.c

43 lines
851 B
C
Raw Normal View History

2019-10-23 13:17:57 +02:00
/*
* NcLooper test des fonctions audio
*/
#include <stdio.h>
2019-10-23 18:46:27 +02:00
#include <unistd.h>
#include <ao/ao.h>
2019-10-23 13:17:57 +02:00
#include "ao_output.h"
2019-10-23 18:46:27 +02:00
#include "playfile.h"
2019-10-23 13:17:57 +02:00
/* --------------------------------------------------------------------- */
2019-10-23 18:46:27 +02:00
int verbosity;
2019-10-23 13:17:57 +02:00
/* --------------------------------------------------------------------- */
int main(int argc, char *argv[])
{
2019-10-23 18:46:27 +02:00
int foo;
ao_device *device;
2019-10-23 13:17:57 +02:00
2019-10-23 18:46:27 +02:00
device = init_ao_output(44100);
fprintf(stderr, "AO init -> %p\n", device);
2019-10-23 13:17:57 +02:00
2019-10-23 18:46:27 +02:00
foo = play_some_stuff(device, 0);
2019-10-23 13:17:57 +02:00
fprintf(stderr, "play stuff -> %d\n", foo);
2019-10-23 18:46:27 +02:00
sleep(1);
foo = blast_this_file("/home/tth/BU/vrac/1337.wav", device, 0);
fprintf(stderr, "blast file -> %d\n", foo);
foo = close_ao_output(device);
2019-10-23 13:17:57 +02:00
fprintf(stderr, "AO close -> %d\n", foo);
return 0;
}
/* --------------------------------------------------------------------- */