Debian Codegraph @

src/cdogs/cwolfmap/audio.h

raw symbols SCIP
1 #pragma once
2 #include <stdbool.h>
3 #include <stdint.h>
4 #include <string.h>
5
6 #include <SDL_audio.h>
7
8 #include "common.h"
9
10 #define MUSIC_SAMPLE_RATE 44100
11 #define MUSIC_AUDIO_FMT AUDIO_S16SYS
12 #define MUSIC_AUDIO_CHANNELS 2
13
14 bool CWAudioInit(void);
15 void CWAudioTerminate(void);
16
17 int CWAudioLoadHead(CWAudioHead *head, const char *path);
18 void CWAudioHeadFree(CWAudioHead *head);
19
20 int CWAudioLoadAudioT(CWAudio *audio, const CWMapType type, const char *path);
21
22 void CWAudioFree(CWAudio *audio);
23
24 // http://www.vgmpf.com/Wiki/index.php?title=IMF
25 int CWAudioGetAdlibSoundRaw(
26 const CWAudio *audio, const int i, const char **data, size_t *len);
27 int CWAudioGetAdlibSound(
28 const CWAudio *audio, const int i, char **data, size_t *len);
29 int CWAudioGetMusicRaw(
30 const CWAudio *audio, const int i, const char **data, size_t *len);
31 int CWAudioGetMusic(
32 CWAudio *audio, const CWMapType type, const int idx, char **data,
33 size_t *len);
34
35 typedef enum
36 {
37 SONG_INTRO,
38 SONG_MENU,
39 SONG_END,
40 SONG_ROSTER,
41 SONG_VICTORY
42 } CWSongType;
43
44 int CWAudioGetLevelMusic(const CWMapType type, const int level);
45 int CWAudioGetSong(const CWMapType type, const CWSongType song);