_info 1.6 KB

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