X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fogg_to_pcm%2F_info.c;fp=ccan%2Fogg_to_pcm%2F_info.c;h=bf023c8b81b7bdf2af1f54fca6121d061aaec236;hp=0000000000000000000000000000000000000000;hb=67fed6580a18ec18cb649172907f986fbc2e60c0;hpb=e7e9d300cc3578e2fb62e2574229f5485334e2f0 diff --git a/ccan/ogg_to_pcm/_info.c b/ccan/ogg_to_pcm/_info.c new file mode 100644 index 00000000..bf023c8b --- /dev/null +++ b/ccan/ogg_to_pcm/_info.c @@ -0,0 +1,43 @@ +#include +#include +#include "config.h" + +/** + * ogg_to_pcm - decode ogg vorbis audio files to PCM data using libvorbis + * + * ogg_to_pcm implements a single function using libvorbis to decode + * signed 16 bit ogg audio data to signed 16 bit PCM data. + * + * Example: + * #include + * #include + * + * int main(int argc, char *argv[]) + * { + * int16_t *pcmbuffer; + * int rc, sample_size, sample_rate, channels, nsamples; + * + * rc = ogg_to_pcm("mysound.ogg", &pcmbuffer, + * &sample_size, &sample_rate, &channels, &nsamples); + * if (rc != 0) + * return -1; + * return 0; + * } + * + * Licence: LGPL (2 or any later version) + * + */ +int main(int argc, char *argv[]) +{ + if (argc != 2) + return 1; + + if (strcmp(argv[1], "depends") == 0) + return 0; + + if (strcmp(argv[1], "libs") == 0) { + printf("vorbisfile\n"); + return 0; + } + return 1; +}