dernier commit avant travaux...
This commit is contained in:
42
audio/t.c
42
audio/t.c
@@ -19,14 +19,37 @@ void help(int k)
|
||||
{
|
||||
}
|
||||
/* --------------------------------------------------------------------- */
|
||||
int envoyer_du_son(char *fname, int k)
|
||||
{
|
||||
ao_device *device;
|
||||
int foo;
|
||||
|
||||
device = init_ao_output(44100);
|
||||
fprintf(stderr, "AO init -> %p\n", device);
|
||||
|
||||
switch (k) {
|
||||
case 0:
|
||||
foo = blast_this_file(fname, device, 1);
|
||||
fprintf(stderr, "blast file -> %d\n", foo);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
foo = play_some_stuff(device, 0);
|
||||
fprintf(stderr, "play stuff -> %d\n", foo);
|
||||
break;
|
||||
}
|
||||
|
||||
foo = close_ao_output(device);
|
||||
fprintf(stderr, "AO close -> %d\n", foo);
|
||||
|
||||
return 0;
|
||||
}
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
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;
|
||||
@@ -38,18 +61,7 @@ while ((opt = getopt(argc, argv, "hv")) != -1) {
|
||||
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);
|
||||
|
||||
envoyer_du_son("AK14V-ORDRES.wav", 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user