DEADSOFTWARE

added opengl and sdl2 wrappers to allegro (WIP)
[d2df-sdl.git] / src / wrappers / sdl2 / sdl2stub_mixer.inc
1 {$INCLUDE ../shared/a_modes.inc}
2 {$SCOPEDENUMS OFF}
4 interface
6 uses SDL2;
8 const
9 MIX_INIT_FLAC = $00000001;
10 MIX_INIT_MOD = $00000002;
11 MIX_INIT_MODPLUG = $00000004;
12 MIX_INIT_MP3 = $00000008;
13 MIX_INIT_OGG = $00000010;
14 MIX_INIT_FLUIDSYNTH = $00000020;
16 MIX_DEFAULT_FREQUENCY = 22050;
17 MIX_DEFAULT_CHANNELS = 2;
18 MIX_MAX_VOLUME = 128;
20 {$IFDEF FPC}
21 {$IF DEFINED(ENDIAN_LITTLE)}
22 MIX_DEFAULT_FORMAT = AUDIO_S16LSB;
23 {$ELSEIF DEFINED(ENDIAN_BIG)}
24 MIX_DEFAULT_FORMAT = AUDIO_S16MSB;
25 {$ELSE}
26 {$FATAL Unable to determine endianness.}
27 {$IFEND}
28 {$ENDIF}
30 type
31 PMix_Chunk = ^TMix_Chunk;
32 TMix_Chunk = record
33 allocated: Integer;
34 abuf: PUInt8;
35 alen: UInt32;
36 volume: UInt8;
37 end;
39 PMix_Music = ^TMix_Music;
40 TMix_Music = record end;
42 TMix_Fading = (MIX_NO_FADING, MIX_FADING_OUT, MIX_FADING_IN);
44 TMix_MusicType = (MUS_NONE,
45 MUS_CMD,
46 MUS_WAV,
47 MUS_MOD,
48 MUS_MID,
49 MUS_OGG,
50 MUS_MP3,
51 MUS_MP3_MAD,
52 MUS_FLAC,
53 MUS_MODPLUG);
55 TMix_Channel_Finished = procedure(channel: Integer); cdecl;
57 (** procedures **)
59 function Mix_GetMusicType(music: TMix_Music): TMix_MusicType;
60 function Mix_Init(flags: Integer): Integer;
61 function Mix_OpenAudio(frequency: Integer; format: UInt16; channels: Integer; chunksize: Integer): Integer;
62 function Mix_GetError: PAnsiChar;
63 function Mix_QuerySpec(frequency: PInt; format: PUInt16; channels: PInt): Integer;
64 function Mix_GetNumChunkDecoders: Integer;
65 function Mix_GetChunkDecoder(index: Integer): PAnsiChar;
66 function Mix_GetNumMusicDecoders: Integer;
67 function Mix_GetMusicDecoder(index: Integer): PAnsiChar;
68 function Mix_AllocateChannels(numchans: Integer): Integer;
69 procedure Mix_ChannelFinished(channel_finished: TMix_Channel_Finished);
70 function Mix_LoadMUS(_file: PAnsiChar): PMix_Music;
71 function Mix_LoadMUS_RW(src: PSDL_RWops; freesrc: Integer): PMix_Music;
72 function Mix_LoadWAV(_file: PAnsiChar): PMix_Chunk;
73 function Mix_LoadWAV_RW(src: PSDL_RWops; freesrc: Integer): PMix_Chunk;
75 function Mix_PlayChannel(channel: Integer; chunk: PMix_Chunk; loops: Integer): Integer;
76 function Mix_Volume(channel: Integer; volume: Integer): Integer;
77 function Mix_HaltMusic: Integer;
78 function Mix_PlayMusic(music: PMix_Music; loops: Integer): Integer;
79 function Mix_SetPanning(channel: Integer; left: UInt8; right: UInt8): Integer;
80 procedure Mix_FreeChunk(chunk: PMix_Chunk);
81 procedure Mix_FreeMusic(music: PMix_Music);
83 function Mix_VolumeMusic(volume: Integer): Integer;
84 function Mix_HaltChannel(channel: Integer): Integer;
85 procedure Mix_CloseAudio;
86 function Mix_PlayingMusic: Integer;
87 function Mix_Paused(channel: Integer): Integer;
88 procedure Mix_Pause(channel: Integer);
89 procedure Mix_Resume(channel: Integer);
91 procedure Mix_PauseMusic;
92 function Mix_PausedMusic: Integer;
93 procedure Mix_ResumeMusic;
95 implementation
97 function Mix_GetMusicType(music: TMix_Music): TMix_MusicType;
98 begin
99 result := TMix_MusicType.MUS_NONE
100 end;
102 function Mix_Init(flags: Integer): Integer;
103 begin
104 result := 0
105 end;
107 function Mix_OpenAudio(frequency: Integer; format: UInt16; channels: Integer; chunksize: Integer): Integer;
108 begin
109 result := 0
110 end;
112 function Mix_GetError: PAnsiChar;
113 begin
114 result := ''
115 end;
117 function Mix_QuerySpec(frequency: PInt; format: PUInt16; channels: PInt): Integer;
118 begin
119 result := 0
120 end;
122 function Mix_GetNumChunkDecoders: Integer;
123 begin
124 result := 0
125 end;
127 function Mix_GetChunkDecoder(index: Integer): PAnsiChar;
128 begin
129 result := ''
130 end;
132 function Mix_GetNumMusicDecoders: Integer;
133 begin
134 result := 0
135 end;
137 function Mix_GetMusicDecoder(index: Integer): PAnsiChar;
138 begin
139 result := ''
140 end;
142 function Mix_AllocateChannels(numchans: Integer): Integer;
143 begin
144 result := 0
145 end;
147 procedure Mix_ChannelFinished(channel_finished: TMix_Channel_Finished);
148 begin
149 end;
151 function Mix_LoadMUS(_file: PAnsiChar): PMix_Music;
152 begin
153 result := nil
154 end;
156 function Mix_LoadMUS_RW(src: PSDL_RWops; freesrc: Integer): PMix_Music;
157 begin
158 result := nil
159 end;
161 function Mix_LoadWAV(_file: PAnsiChar): PMix_Chunk;
162 begin
163 Result := Mix_LoadWAV_RW(SDL_RWFromFile(_file, 'rb'), 1);
164 end;
166 function Mix_LoadWAV_RW(src: PSDL_RWops; freesrc: Integer): PMix_Chunk;
167 begin
168 result := nil
169 end;
171 function Mix_PlayChannel(channel: Integer; chunk: PMix_Chunk; loops: Integer): Integer;
172 begin
173 result := 0
174 end;
176 function Mix_Volume(channel: Integer; volume: Integer): Integer;
177 begin
178 result := 0
179 end;
181 function Mix_HaltMusic: Integer;
182 begin
183 result := 0
184 end;
186 function Mix_PlayMusic(music: PMix_Music; loops: Integer): Integer;
187 begin
188 result := 0
189 end;
191 function Mix_SetPanning(channel: Integer; left: UInt8; right: UInt8): Integer;
192 begin
193 result := 0
194 end;
196 procedure Mix_FreeChunk(chunk: PMix_Chunk);
197 begin
198 end;
200 procedure Mix_FreeMusic(music: PMix_Music);
201 begin
202 end;
204 function Mix_VolumeMusic(volume: Integer): Integer;
205 begin
206 result := 0
207 end;
209 function Mix_HaltChannel(channel: Integer): Integer;
210 begin
211 result := 0
212 end;
214 procedure Mix_CloseAudio;
215 begin
216 end;
218 function Mix_PlayingMusic: Integer;
219 begin
220 result := 0
221 end;
223 function Mix_Paused(channel: Integer): Integer;
224 begin
225 result := 0
226 end;
228 procedure Mix_Pause(channel: Integer);
229 begin
230 end;
232 procedure Mix_Resume(channel: Integer);
233 begin
234 end;
236 procedure Mix_PauseMusic;
237 begin
238 end;
240 function Mix_PausedMusic: Integer;
241 begin
242 result := 0
243 end;
245 procedure Mix_ResumeMusic;
246 begin
247 end;