sound.h 464 B

1234567891011121314151617181920212223242526
  1. /**
  2. *** :: Sound ::
  3. ***
  4. *** Can be loaded from WAV
  5. ***
  6. **/
  7. #ifndef sound_h
  8. #define sound_h
  9. #include "cengine.h"
  10. typedef struct {
  11. Mix_Chunk* sample;
  12. } sound;
  13. sound* wav_load_file(char* filename);
  14. void sound_delete(sound* s);
  15. int sound_play(sound* s);
  16. int sound_play_looped(sound* s, int loops);
  17. int sound_play_at(sound* s, vec3 pos, vec3 cam_pos, vec3 cam_dir);
  18. int sound_play_at_looped(sound* s, vec3 pos, vec3 cam_pos, vec3 cam_dir, int loops);
  19. #endif