Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. #ifndef SDLAUDIO_H
  2. #define SDLAUDIO_H
  3.  
  4. #include <SDL_mixer.h>
  5. #include <string.h>
  6.  
  7. //#define PHL_Music Mix_Music*
  8. #define PHL_Sound Mix_Chunk*
  9. typedef struct
  10. {
  11.     int         loop;
  12.     Mix_Music*  snd;
  13.  
  14. } PHL_Music;
  15.  
  16. extern int music_volume;
  17.  
  18. void PHL_AudioInit();
  19. void PHL_AudioClose();
  20.  
  21. void PHL_MusicVolume(float vol);
  22.  
  23. PHL_Music PHL_LoadMusic(char* fname, int loop); //Same as PHL_LoadSound, but expects a file name without extension
  24. PHL_Sound PHL_LoadSound(char* fname);
  25.  
  26. void PHL_PlayMusic(PHL_Music snd);
  27. void PHL_PlaySound(PHL_Sound snd, int channel);
  28.  
  29. void PHL_StopMusic();
  30. void PHL_StopSound(PHL_Sound snd, int channel);
  31.  
  32. void PHL_FreeMusic(PHL_Music snd);
  33. void PHL_FreeSound(PHL_Sound snd);
  34.  
  35. #endif
  36.