]> git.ozlabs.org Git - ccan/blob - ccan/ogg_to_pcm/_info
various: make the _info License: wording uniform for GPL variants.
[ccan] / ccan / ogg_to_pcm / _info
1 #include <stdio.h>
2 #include <string.h>
3 #include "config.h"
4
5 /**
6  * ogg_to_pcm - decode ogg vorbis audio files to PCM data using libvorbis 
7  *
8  * ogg_to_pcm implements a single function using libvorbis to decode
9  * signed 16 bit ogg audio data to signed 16 bit PCM data.
10  *
11  * Example:
12  *      #include <stdint.h>
13  *      #include <ogg_to_pcm.h>
14  *
15  *      int main(int argc, char *argv[]) 
16  *      {
17  *              int16_t *pcmbuffer;
18  *              int rc, sample_size, sample_rate, channels, nsamples;
19  *
20  *              rc = ogg_to_pcm("mysound.ogg", &pcmbuffer,
21  *                      &sample_size, &sample_rate, &channels, &nsamples);
22  *              if (rc != 0)
23  *                      return -1;
24  *              return 0;
25  *      }
26  *
27  * License: LGPL (v2.1 or any later version)
28  *
29  */
30 int main(int argc, char *argv[])
31 {
32         if (argc != 2)
33                 return 1;
34
35         if (strcmp(argv[1], "depends") == 0) {
36                 printf("libvorbis\n");
37                 return 0;
38         }
39
40         if (strcmp(argv[1], "libs") == 0) {
41                 printf("vorbisfile\n");
42                 return 0;
43         }
44         return 1;
45 }