_info 912 B

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