Debian Codegraph @

SDL_audiolib/src/sdl_mixer_emu/sdl_mixer_emu.cpp

raw
1 // This is copyrighted software. More information is at the end of this file.
2 #include "sdl_mixer_emu.h"
3 #include "aulib.h"
4 #include "aulib_config.h"
5 #include "aulib_global.h"
6 #include "aulib_log.h"
7 //#include "stream.h"
8
9 auto Mix_Linked_Version() -> const SDL_version*
10 {
11 aulib::log::debugLn("{}", __func__);
12
13 static SDL_version v = {SDL_MIXER_MAJOR_VERSION, SDL_MIXER_MINOR_VERSION, SDL_MIXER_PATCHLEVEL};
14 return &v;
15 }
16
17 auto Mix_Init(int flags) -> int
18 {
19 aulib::log::debugLn("{}", __func__);
20
21 return flags;
22 }
23
24 void Mix_Quit()
25 {
26 aulib::log::debugLn("{}", __func__);
27
28 Aulib::quit();
29 }
30
31 auto Mix_OpenAudio(int frequency, Uint16 format, int channels, int chunksize) -> int
32 {
33 aulib::log::debugLn("{}", __func__);
34
35 return Aulib::init(frequency, format, channels, chunksize);
36 }
37
38 auto Mix_AllocateChannels(int numchans) -> int
39 {
40 aulib::log::debugLn("{}", __func__);
41
42 return numchans;
43 }
44
45 auto Mix_QuerySpec(int* frequency, Uint16* format, int* channels) -> int
46 {
47 aulib::log::debugLn("{}", __func__);
48
49 if (frequency) {
50 *frequency = Aulib::sampleRate();
51 }
52 if (format) {
53 *format = Aulib::sampleFormat();
54 }
55 if (channels) {
56 *channels = Aulib::channelCount();
57 }
58 return 1; // TODO
59 }
60
61 auto Mix_LoadWAV_RW(SDL_RWops* /*src*/, int /*freesrc*/) -> Mix_Chunk*
62 {
63 aulib::log::debugLn("{}", __func__);
64
65 return nullptr;
66 }
67
68 auto Mix_QuickLoad_WAV(Uint8* /*mem*/) -> Mix_Chunk*
69 {
70 aulib::log::debugLn("{}", __func__);
71
72 return nullptr;
73 }
74
75 auto Mix_QuickLoad_RAW(Uint8* /*mem*/, Uint32 /*len*/) -> Mix_Chunk*
76 {
77 aulib::log::debugLn("{}", __func__);
78
79 return nullptr;
80 }
81
82 void Mix_FreeChunk(Mix_Chunk* /*chunk*/)
83 {
84 aulib::log::debugLn("{}", __func__);
85 }
86
87 auto Mix_GetNumChunkDecoders() -> int
88 {
89 aulib::log::debugLn("{}", __func__);
90
91 return 0;
92 }
93
94 auto Mix_GetChunkDecoder(int /*index*/) -> const char*
95 {
96 aulib::log::debugLn("{}", __func__);
97
98 return nullptr;
99 }
100
101 void Mix_SetPostMix(void (*/*mix_func*/)(void*, Uint8*, int), void* /*arg*/)
102 {
103 aulib::log::debugLn("{}", __func__);
104 }
105
106 void Mix_ChannelFinished(void (*/*channel_finished*/)(int))
107 {
108 aulib::log::debugLn("{}", __func__);
109 }
110
111 auto Mix_RegisterEffect(int /*chan*/, Mix_EffectFunc_t /*f*/, Mix_EffectDone_t /*d*/, void* /*arg*/)
112 -> int
113 {
114 aulib::log::debugLn("{}", __func__);
115
116 return 0;
117 }
118
119 auto Mix_UnregisterEffect(int /*channel*/, Mix_EffectFunc_t /*f*/) -> int
120 {
121 aulib::log::debugLn("{}", __func__);
122
123 return 0;
124 }
125
126 auto Mix_UnregisterAllEffects(int /*channel*/) -> int
127 {
128 aulib::log::debugLn("{}", __func__);
129
130 return 0;
131 }
132
133 auto Mix_SetPanning(int /*channel*/, Uint8 /*left*/, Uint8 /*right*/) -> int
134 {
135 aulib::log::debugLn("{}", __func__);
136
137 return 0;
138 }
139
140 auto Mix_SetPosition(int /*channel*/, Sint16 /*angle*/, Uint8 /*distance*/) -> int
141 {
142 aulib::log::debugLn("{}", __func__);
143
144 return 0;
145 }
146
147 auto Mix_SetDistance(int /*channel*/, Uint8 /*distance*/) -> int
148 {
149 aulib::log::debugLn("{}", __func__);
150
151 return 0;
152 }
153
154 auto Mix_SetReverseStereo(int /*channel*/, int /*flip*/) -> int
155 {
156 aulib::log::debugLn("{}", __func__);
157
158 return 0;
159 }
160
161 auto Mix_ReserveChannels(int /*num*/) -> int
162 {
163 aulib::log::debugLn("{}", __func__);
164
165 return 0;
166 }
167
168 auto Mix_GroupChannel(int /*which*/, int /*tag*/) -> int
169 {
170 aulib::log::debugLn("{}", __func__);
171
172 return 0;
173 }
174
175 auto Mix_GroupChannels(int /*from*/, int /*to*/, int /*tag*/) -> int
176 {
177 aulib::log::debugLn("{}", __func__);
178
179 return 0;
180 }
181
182 auto Mix_GroupAvailable(int /*tag*/) -> int
183 {
184 aulib::log::debugLn("{}", __func__);
185
186 return -1;
187 }
188
189 auto Mix_GroupCount(int /*tag*/) -> int
190 {
191 aulib::log::debugLn("{}", __func__);
192
193 return 0;
194 }
195
196 auto Mix_GroupOldest(int /*tag*/) -> int
197 {
198 aulib::log::debugLn("{}", __func__);
199
200 return 0;
201 }
202
203 auto Mix_GroupNewer(int /*tag*/) -> int
204 {
205 aulib::log::debugLn("{}", __func__);
206
207 return 0;
208 }
209
210 auto Mix_PlayChannelTimed(int /*channel*/, Mix_Chunk* /*chunk*/, int /*loops*/, int /*ticks*/)
211 -> int
212 {
213 aulib::log::debugLn("{}", __func__);
214
215 return 0;
216 }
217
218 auto Mix_FadeInChannelTimed(int /*channel*/, Mix_Chunk* /*chunk*/, int /*loops*/, int /*ms*/,
219 int /*ticks*/) -> int
220 {
221 aulib::log::debugLn("{}", __func__);
222
223 return 0;
224 }
225
226 auto Mix_Volume(int /*channel*/, int /*volume*/) -> int
227 {
228 aulib::log::debugLn("{}", __func__);
229
230 return 0;
231 }
232
233 auto Mix_VolumeChunk(Mix_Chunk* /*chunk*/, int /*volume*/) -> int
234 {
235 aulib::log::debugLn("{}", __func__);
236
237 return 0;
238 }
239
240 auto Mix_HaltChannel(int /*channel*/) -> int
241 {
242 aulib::log::debugLn("{}", __func__);
243
244 return 0;
245 }
246
247 auto Mix_HaltGroup(int /*tag*/) -> int
248 {
249 aulib::log::debugLn("{}", __func__);
250
251 return 0;
252 }
253
254 auto Mix_ExpireChannel(int /*channel*/, int /*ticks*/) -> int
255 {
256 aulib::log::debugLn("{}", __func__);
257
258 return 0;
259 }
260
261 auto Mix_FadeOutChannel(int /*which*/, int /*ms*/) -> int
262 {
263 aulib::log::debugLn("{}", __func__);
264
265 return 0;
266 }
267
268 auto Mix_FadeOutGroup(int /*tag*/, int /*ms*/) -> int
269 {
270 aulib::log::debugLn("{}", __func__);
271
272 return 0;
273 }
274
275 auto Mix_FadingChannel(int /*which*/) -> Mix_Fading
276 {
277 aulib::log::debugLn("{}", __func__);
278
279 return MIX_NO_FADING;
280 }
281
282 void Mix_Pause(int /*channel*/)
283 {
284 aulib::log::debugLn("{}", __func__);
285 }
286
287 void Mix_Resume(int /*channel*/)
288 {
289 aulib::log::debugLn("{}", __func__);
290 }
291
292 auto Mix_Paused(int /*channel*/) -> int
293 {
294 aulib::log::debugLn("{}", __func__);
295
296 return 0;
297 }
298
299 auto Mix_Playing(int /*channel*/) -> int
300 {
301 aulib::log::debugLn("{}", __func__);
302
303 return 0;
304 }
305
306 auto Mix_GetChunk(int /*channel*/) -> Mix_Chunk*
307 {
308 aulib::log::debugLn("{}", __func__);
309
310 return nullptr;
311 }
312
313 void Mix_CloseAudio()
314 {
315 aulib::log::debugLn("{}", __func__);
316 }
317
318 /*
319
320 Copyright (C) 2014, 2015, 2016, 2017, 2018, 2019 Nikos Chantziaras.
321
322 This file is part of SDL_audiolib.
323
324 SDL_audiolib is free software: you can redistribute it and/or modify it under
325 the terms of the GNU Lesser General Public License as published by the Free
326 Software Foundation, either version 3 of the License, or (at your option) any
327 later version.
328
329 SDL_audiolib is distributed in the hope that it will be useful, but WITHOUT
330 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
331 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
332 details.
333
334 You should have received a copy of the GNU Lesser General Public License
335 along with SDL_audiolib. If not, see <http://www.gnu.org/licenses/>.
336
337 */