Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. #ifdef MODPLUG_MUSIC
  2.  
  3. #include "modplug.h"
  4. #include "SDL_rwops.h"
  5. #include "SDL_audio.h"
  6. #include "SDL_mixer.h"
  7.  
  8. typedef struct {
  9.         ModPlugFile *file;
  10.         int playing;
  11. } modplug_data;
  12.  
  13. int modplug_init(SDL_AudioSpec *mixer);
  14.  
  15. /* Uninitialize the music players */
  16. void modplug_exit(void);
  17.  
  18. /* Set the volume for a modplug stream */
  19. void modplug_setvolume(modplug_data *music, int volume);
  20.  
  21. /* Load a modplug stream from an SDL_RWops object */
  22. modplug_data *modplug_new_RW(SDL_RWops *rw, int freerw);
  23.  
  24. /* Start playback of a given modplug stream */
  25. void modplug_play(modplug_data *music);
  26.  
  27. /* Return non-zero if a stream is currently playing */
  28. int modplug_playing(modplug_data *music);
  29.  
  30. /* Play some of a stream previously started with modplug_play() */
  31. int modplug_playAudio(modplug_data *music, Uint8 *stream, int len);
  32.  
  33. /* Stop playback of a stream previously started with modplug_play() */
  34. void modplug_stop(modplug_data *music);
  35.  
  36. /* Close the given modplug stream */
  37. void modplug_delete(modplug_data *music);
  38.  
  39. /* Jump (seek) to a given position (time is in seconds) */
  40. void modplug_jump_to_time(modplug_data *music, double time);
  41.  
  42. #endif
  43.