2014-06-01 17:55:23 +00:00
|
|
|
/*
|
|
|
|
* This file is part of the DXX-Rebirth project <http://www.dxx-rebirth.com/>.
|
|
|
|
* It is copyright by its individual contributors, as recorded in the
|
|
|
|
* project's Git history. See COPYING.txt at the top level for license
|
|
|
|
* terms and a link to the Git history.
|
|
|
|
*/
|
2006-03-20 17:12:09 +00:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* Header for songs.c
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _SONGS_H
|
|
|
|
#define _SONGS_H
|
|
|
|
|
2012-11-11 22:12:51 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
2013-12-22 22:03:07 +00:00
|
|
|
struct bim_song_info
|
|
|
|
{
|
2006-03-20 17:12:09 +00:00
|
|
|
char filename[16];
|
2013-12-22 22:03:07 +00:00
|
|
|
};
|
2006-03-20 17:12:09 +00:00
|
|
|
|
|
|
|
#define SONG_TITLE 0
|
|
|
|
#define SONG_BRIEFING 1
|
|
|
|
#define SONG_ENDLEVEL 2
|
|
|
|
#define SONG_ENDGAME 3
|
|
|
|
#define SONG_CREDITS 4
|
|
|
|
#define SONG_FIRST_LEVEL_SONG 5
|
|
|
|
|
2013-11-26 22:19:52 +00:00
|
|
|
#define SONG_EXT_HMP "hmp"
|
2012-06-10 12:02:43 +00:00
|
|
|
#ifdef USE_SDLMIXER
|
2013-11-26 22:19:52 +00:00
|
|
|
#define SONG_EXT_MID "mid"
|
|
|
|
#define SONG_EXT_OGG "ogg"
|
|
|
|
#define SONG_EXT_FLAC "flac"
|
|
|
|
#define SONG_EXT_MP3 "mp3"
|
2012-06-10 12:02:43 +00:00
|
|
|
#endif
|
|
|
|
|
2013-06-08 22:24:17 +00:00
|
|
|
int songs_play_file(const char *filename, int repeat, void (*hook_finished_track)());
|
2010-04-05 11:54:23 +00:00
|
|
|
int songs_play_song( int songnum, int repeat );
|
2010-06-14 08:13:16 +00:00
|
|
|
int songs_play_level_song( int levelnum, int offset );
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2009-03-03 12:55:27 +00:00
|
|
|
//stop any songs - midi, redbook or jukebox - that are currently playing
|
2006-03-20 17:12:09 +00:00
|
|
|
void songs_stop_all(void);
|
|
|
|
|
2011-04-18 12:32:36 +00:00
|
|
|
// check which song is playing, or -1 if not playing anything
|
2010-04-05 11:54:23 +00:00
|
|
|
int songs_is_playing();
|
|
|
|
|
2010-06-14 08:13:16 +00:00
|
|
|
void songs_pause(void);
|
|
|
|
void songs_resume(void);
|
|
|
|
void songs_pause_resume(void);
|
|
|
|
|
|
|
|
// set volume for selected music playback system
|
|
|
|
void songs_set_volume(int volume);
|
|
|
|
|
|
|
|
void songs_uninit();
|
|
|
|
|
2012-11-11 22:12:51 +00:00
|
|
|
#endif
|
|
|
|
|
2010-04-05 11:54:23 +00:00
|
|
|
#endif
|
2010-06-14 08:13:16 +00:00
|
|
|
|