]> git.ozlabs.org Git - ccan/blob - ccan/wwviaudio/_info
Import from SAMBA tdb:
[ccan] / ccan / wwviaudio / _info
1 #include <stdio.h>
2 #include <string.h>
3 #include "config.h"
4
5 /**
6  * wwviaudio - realtime playback and mixing of 16 bit signed PCM audio data.
7  *
8  * wwviaudio provides a set of functions for realtime playback and mixing
9  * of audio samples, e.g. music, sound effects, etc. as in a video game.
10  *
11  * Example:
12  *
13  *      something along these lines:
14  *
15  *      if (wwviaudio_initialize_portaudio() != 0)
16  *              bail_out_and_die();
17  *
18  *      You would probably use #defines or enums rather than bare ints...
19  *      wwviaudio_read_ogg_clip(1, "mysound1.ogg");
20  *      wwviaudio_read_ogg_clip(2, "mysound2.ogg");
21  *      wwviaudio_read_ogg_clip(3, "mysound3.ogg");
22  *      wwviaudio_read_ogg_clip(4, "mymusic.ogg");
23  *
24  *       ...
25  *
26  *      wwviaudio_play_music(4); <-- begins playing music in background, returns immediately 
27  *
28  *      while (program isn't done) {
29  *              do_stuff();
30  *              if (something happened)
31  *                      wwviaudio_add_sound(1);
32  *              if (something else happened)
33  *                      wwviaudio_add_sound(2);
34  *              time_passes();
35  *      }
36  *      
37  *      wwviaudio_cancel_all_sounds();
38  *      wwviaduio_stop_portaudio();
39  *
40  * Licence: LGPL (2 or any later version)
41  *
42  */
43 int main(int argc, char *argv[])
44 {
45         if (argc != 2)
46                 return 1;
47
48         if (strcmp(argv[1], "depends") == 0) {
49                 printf("ccan/ogg_to_pcm\n"
50                        "libvorbis\n"
51                        "portaudio >=19\n");
52                 return 0;
53         }
54
55         if (strcmp(argv[1], "libs") == 0) {
56                 printf("vorbisfile\n"
57                        "portaudio\n");
58                 return 0;
59         }
60         return 1;
61 }