Subversion Repositories Games.Descent

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. /*
  2.  * This file is part of the DXX-Rebirth project <https://www.dxx-rebirth.com/>.
  3.  * It is copyright by its individual contributors, as recorded in the
  4.  * project's Git history.  See COPYING.txt at the top level for license
  5.  * terms and a link to the Git history.
  6.  */
  7. /*
  8.  *
  9.  * Header for songs.c
  10.  *
  11.  */
  12.  
  13. #ifndef _SONGS_H
  14. #define _SONGS_H
  15.  
  16. #include <SDL_version.h>
  17. #ifdef __cplusplus
  18. #include "dxxsconf.h"
  19.  
  20. struct bim_song_info
  21. {
  22.         char    filename[16];
  23. };
  24.  
  25. #define SONG_TITLE              0
  26. #define SONG_BRIEFING           1
  27. #define SONG_ENDLEVEL           2
  28. #define SONG_ENDGAME            3
  29. #define SONG_CREDITS            4
  30. #define SONG_FIRST_LEVEL_SONG   5
  31.  
  32. #define SONG_EXT_HMP            "hmp"
  33. #if DXX_USE_SDLMIXER
  34. #define SONG_EXT_MID            "mid"
  35. #define SONG_EXT_OGG            "ogg"
  36. #define SONG_EXT_FLAC           "flac"
  37. #define SONG_EXT_MP3            "mp3"
  38. #endif
  39.  
  40. #if !DXX_USE_SDLMIXER
  41. #ifdef _WIN32
  42. #define songs_play_file(filename,repeat,hook_finished_track)    songs_play_file(filename,repeat)
  43. #else
  44. #define songs_play_file(filename,repeat,hook_finished_track)    songs_play_file()
  45. #endif
  46. #if SDL_MAJOR_VERSION == 2
  47. #define songs_play_song(songnum,repeat) songs_play_song(songnum)
  48. #endif
  49. #endif
  50. int songs_play_file(const char *filename, int repeat, void (*hook_finished_track)());
  51. #ifdef dsx
  52. namespace dsx {
  53. int songs_play_song( int songnum, int repeat );
  54. int songs_play_level_song( int levelnum, int offset );
  55.  
  56. //stop any songs - midi, redbook or jukebox - that are currently playing
  57. }
  58. #endif
  59. void songs_stop_all(void);
  60.  
  61. // check which song is playing, or -1 if not playing anything
  62. int songs_is_playing();
  63.  
  64. void songs_pause(void);
  65. void songs_resume(void);
  66. void songs_pause_resume(void);
  67.  
  68. namespace dcx {
  69.  
  70. // set volume for selected music playback system
  71. void songs_set_volume(int volume);
  72.  
  73. }
  74.  
  75. void songs_uninit();
  76.  
  77. #endif
  78.  
  79. #endif
  80.  
  81.