Skip to content

Commit cc31eaa

Browse files
committed
Sync SDL3_mixer wiki -> header
1 parent baafa2e commit cc31eaa

File tree

1 file changed

+62
-64
lines changed

1 file changed

+62
-64
lines changed

include/SDL3_mixer/SDL_mixer.h

Lines changed: 62 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,8 @@ typedef struct Mix_Music Mix_Music;
277277
*
278278
* \param devid the device name to open, or 0 for a reasonable default.
279279
* \param spec the audio format you'd like SDL_mixer to work in.
280-
* \returns true on success or false on failure; call SDL_GetError()
281-
* for more information.
280+
* \returns true on success or false on failure; call SDL_GetError() for more
281+
* information.
282282
*
283283
* \since This function is available since SDL_mixer 3.0.0.
284284
*
@@ -369,9 +369,9 @@ extern SDL_DECLSPEC int SDLCALL Mix_AllocateChannels(int numchans);
369369
* fly. Also, crucially, there are as many channels for chunks as the app can
370370
* allocate, but SDL_mixer only offers a single "music" channel.
371371
*
372-
* If `closeio` is true, the IOStream will be closed before returning,
373-
* whether this function succeeds or not. SDL_mixer reads everything it needs
374-
* from the IOStream during this call in any case.
372+
* If `closeio` is true, the IOStream will be closed before returning, whether
373+
* this function succeeds or not. SDL_mixer reads everything it needs from the
374+
* IOStream during this call in any case.
375375
*
376376
* There is a separate function (a macro, before SDL_mixer 3.0.0) to read
377377
* files from disk without having to deal with SDL_IOStream:
@@ -382,8 +382,8 @@ extern SDL_DECLSPEC int SDLCALL Mix_AllocateChannels(int numchans);
382382
* Mix_FreeChunk().
383383
*
384384
* \param src an SDL_IOStream that data will be read from.
385-
* \param closeio true to close the SDL_IOStream before returning,
386-
* false to leave it open.
385+
* \param closeio true to close the SDL_IOStream before returning, false to
386+
* leave it open.
387387
* \returns a new chunk, or NULL on error.
388388
*
389389
* \since This function is available since SDL_mixer 3.0.0
@@ -419,8 +419,8 @@ extern SDL_DECLSPEC Mix_Chunk * SDLCALL Mix_LoadWAV_IO(SDL_IOStream *src, bool c
419419
* Mix_FreeChunk().
420420
*
421421
* Note that before SDL_mixer 3.0.0, this function was a macro that called
422-
* Mix_LoadWAV_IO(), creating a IOStream and setting `closeio` to true.
423-
* This macro has since been promoted to a proper API function. Older binaries
422+
* Mix_LoadWAV_IO(), creating a IOStream and setting `closeio` to true. This
423+
* macro has since been promoted to a proper API function. Older binaries
424424
* linked against a newer SDL_mixer will still call Mix_LoadWAV_IO directly,
425425
* as they are using the macro, which was available since the dawn of time.
426426
*
@@ -483,9 +483,9 @@ extern SDL_DECLSPEC Mix_Music * SDLCALL Mix_LoadMUS(const char *file);
483483
* fly. Also, crucially, there are as many channels for chunks as the app can
484484
* allocate, but SDL_mixer only offers a single "music" channel.
485485
*
486-
* If `closeio` is true, the IOStream will be closed before returning,
487-
* whether this function succeeds or not. SDL_mixer reads everything it needs
488-
* from the IOStream during this call in any case.
486+
* If `closeio` is true, the IOStream will be closed before returning, whether
487+
* this function succeeds or not. SDL_mixer reads everything it needs from the
488+
* IOStream during this call in any case.
489489
*
490490
* As a convenience, there is a function to read files from disk without
491491
* having to deal with SDL_IOStream: `Mix_LoadMUS("filename.mp3")` will manage
@@ -499,8 +499,8 @@ extern SDL_DECLSPEC Mix_Music * SDLCALL Mix_LoadMUS(const char *file);
499499
* Mix_FreeMusic().
500500
*
501501
* \param src an SDL_IOStream that data will be read from.
502-
* \param closeio true to close the SDL_IOStream before returning,
503-
* false to leave it open.
502+
* \param closeio true to close the SDL_IOStream before returning, false to
503+
* leave it open.
504504
* \returns a new music object, or NULL on error.
505505
*
506506
* \since This function is available since SDL_mixer 3.0.0.
@@ -543,9 +543,9 @@ extern SDL_DECLSPEC Mix_Music * SDLCALL Mix_LoadMUS_IO(SDL_IOStream *src, bool c
543543
* - `MUS_OPUS` (Opus files)
544544
* - `MUS_WAVPACK` (WavPack files)
545545
*
546-
* If `closeio` is true, the IOStream will be closed before returning,
547-
* whether this function succeeds or not. SDL_mixer reads everything it needs
548-
* from the IOStream during this call in any case.
546+
* If `closeio` is true, the IOStream will be closed before returning, whether
547+
* this function succeeds or not. SDL_mixer reads everything it needs from the
548+
* IOStream during this call in any case.
549549
*
550550
* As a convenience, there is a function to read files from disk without
551551
* having to deal with SDL_IOStream: `Mix_LoadMUS("filename.mp3")` will manage
@@ -556,8 +556,8 @@ extern SDL_DECLSPEC Mix_Music * SDLCALL Mix_LoadMUS_IO(SDL_IOStream *src, bool c
556556
*
557557
* \param src an SDL_IOStream that data will be read from.
558558
* \param type the type of audio data provided by `src`.
559-
* \param closeio true to close the SDL_IOStream before returning,
560-
* false to leave it open.
559+
* \param closeio true to close the SDL_IOStream before returning, false to
560+
* leave it open.
561561
* \returns a new music object, or NULL on error.
562562
*
563563
* \since This function is available since SDL_mixer 3.0.0.
@@ -719,8 +719,7 @@ extern SDL_DECLSPEC const char * SDLCALL Mix_GetChunkDecoder(int index);
719719
* capital letters (some example names are "AIFF", "VOC", "WAV").
720720
*
721721
* \param name the decoder name to query.
722-
* \returns true if a decoder by that name is available, false
723-
* otherwise.
722+
* \returns true if a decoder by that name is available, false otherwise.
724723
*
725724
* \since This function is available since SDL_mixer 3.0.0.
726725
*
@@ -787,8 +786,7 @@ extern SDL_DECLSPEC const char * SDLCALL Mix_GetMusicDecoder(int index);
787786
* capital letters (some example names are "MOD", "MP3", "FLAC").
788787
*
789788
* \param name the decoder name to query.
790-
* \returns true if a decoder by that name is available, false
791-
* otherwise.
789+
* \returns true if a decoder by that name is available, false otherwise.
792790
*
793791
* \since This function is available since SDL_mixer 3.0.0
794792
*
@@ -1178,8 +1176,8 @@ typedef void (SDLCALL *Mix_EffectDone_t)(int chan, void *udata);
11781176
* mixed.
11791177
* \param d effect done callback.
11801178
* \param arg argument.
1181-
* \returns true on success or false on failure; call SDL_GetError()
1182-
* for more information.
1179+
* \returns true on success or false on failure; call SDL_GetError() for more
1180+
* information.
11831181
*
11841182
* \since This function is available since SDL_mixer 3.0.0.
11851183
*/
@@ -1203,8 +1201,8 @@ extern SDL_DECLSPEC bool SDLCALL Mix_RegisterEffect(int chan, Mix_EffectFunc_t f
12031201
*
12041202
* \param channel the channel to unregister an effect on, or MIX_CHANNEL_POST.
12051203
* \param f effect the callback stop calling in future mixing iterations.
1206-
* \returns true on success or false on failure; call SDL_GetError()
1207-
* for more information.
1204+
* \returns true on success or false on failure; call SDL_GetError() for more
1205+
* information.
12081206
*
12091207
* \since This function is available since SDL_mixer 3.0.0.
12101208
*/
@@ -1229,8 +1227,8 @@ extern SDL_DECLSPEC bool SDLCALL Mix_UnregisterEffect(int channel, Mix_EffectFun
12291227
*
12301228
* \param channel the channel to unregister all effects on, or
12311229
* MIX_CHANNEL_POST.
1232-
* \returns true on success or false on failure; call SDL_GetError()
1233-
* for more information.
1230+
* \returns true on success or false on failure; call SDL_GetError() for more
1231+
* information.
12341232
*
12351233
* \since This function is available since SDL_mixer 3.0.0.
12361234
*/
@@ -1288,8 +1286,8 @@ extern SDL_DECLSPEC bool SDLCALL Mix_UnregisterAllEffects(int channel);
12881286
* volume.
12891287
* \param right Volume of stereo right channel, 0 is silence, 255 is full
12901288
* volume.
1291-
* \returns true on success or false on failure; call SDL_GetError()
1292-
* for more information.
1289+
* \returns true on success or false on failure; call SDL_GetError() for more
1290+
* information.
12931291
*
12941292
* \since This function is available since SDL_mixer 3.0.0.
12951293
*
@@ -1341,8 +1339,8 @@ extern SDL_DECLSPEC bool SDLCALL Mix_SetPanning(int channel, Uint8 left, Uint8 r
13411339
* \param channel The mixer channel to position, or MIX_CHANNEL_POST.
13421340
* \param angle angle, in degrees. North is 0, and goes clockwise.
13431341
* \param distance distance; 0 is the listener, 255 is maxiumum distance away.
1344-
* \returns true on success or false on failure; call SDL_GetError()
1345-
* for more information.
1342+
* \returns true on success or false on failure; call SDL_GetError() for more
1343+
* information.
13461344
*
13471345
* \since This function is available since SDL_mixer 3.0.0.
13481346
*/
@@ -1378,8 +1376,8 @@ extern SDL_DECLSPEC bool SDLCALL Mix_SetPosition(int channel, Sint16 angle, Uint
13781376
*
13791377
* \param channel The mixer channel to attenuate, or MIX_CHANNEL_POST.
13801378
* \param distance distance; 0 is the listener, 255 is maxiumum distance away.
1381-
* \returns true on success or false on failure; call SDL_GetError()
1382-
* for more information.
1379+
* \returns true on success or false on failure; call SDL_GetError() for more
1380+
* information.
13831381
*
13841382
* \since This function is available since SDL_mixer 3.0.0.
13851383
*/
@@ -1410,9 +1408,9 @@ extern SDL_DECLSPEC bool SDLCALL Mix_SetDistance(int channel, Uint8 distance);
14101408
*
14111409
* \param channel The mixer channel to reverse, or MIX_CHANNEL_POST.
14121410
* \param flip non-zero to reverse stereo, zero to disable this effect.
1413-
* \returns true on success or false on failure; call SDL_GetError()
1414-
* for more information. Note that an audio device in mono mode is a
1415-
* no-op, but this call will return successful in that case.
1411+
* \returns true on success or false on failure; call SDL_GetError() for more
1412+
* information. Note that an audio device in mono mode is a no-op,
1413+
* but this call will return successful in that case.
14161414
*
14171415
* \since This function is available since SDL_mixer 3.0.0.
14181416
*/
@@ -1466,8 +1464,8 @@ extern SDL_DECLSPEC int SDLCALL Mix_ReserveChannels(int num);
14661464
*
14671465
* \param which the channel to set the tag on.
14681466
* \param tag an arbitrary value to assign a channel.
1469-
* \returns true on success or false on failure; call SDL_GetError()
1470-
* for more information.
1467+
* \returns true on success or false on failure; call SDL_GetError() for more
1468+
* information.
14711469
*
14721470
* \since This function is available since SDL_mixer 3.0.0.
14731471
*/
@@ -1493,8 +1491,8 @@ extern SDL_DECLSPEC bool SDLCALL Mix_GroupChannel(int which, int tag);
14931491
* \param from the first channel to set the tag on.
14941492
* \param to the last channel to set the tag on, inclusive.
14951493
* \param tag an arbitrary value to assign a channel.
1496-
* \returns true on success or false on failure; call SDL_GetError()
1497-
* for more information.
1494+
* \returns true on success or false on failure; call SDL_GetError() for more
1495+
* information.
14981496
*
14991497
* \since This function is available since SDL_mixer 3.0.0.
15001498
*/
@@ -1647,8 +1645,8 @@ extern SDL_DECLSPEC int SDLCALL Mix_PlayChannelTimed(int channel, Mix_Chunk *chu
16471645
* \param music the new music object to schedule for mixing.
16481646
* \param loops the number of loops to play the music for (0 means "play once
16491647
* and stop").
1650-
* \returns true on success or false on failure; call SDL_GetError()
1651-
* for more information.
1648+
* \returns true on success or false on failure; call SDL_GetError() for more
1649+
* information.
16521650
*
16531651
* \since This function is available since SDL_mixer 3.0.0.
16541652
*/
@@ -1675,8 +1673,8 @@ extern SDL_DECLSPEC bool SDLCALL Mix_PlayMusic(Mix_Music *music, int loops);
16751673
* \param loops the number of times the chunk should loop, -1 to loop (not
16761674
* actually) infinitely.
16771675
* \param ms the number of milliseconds to spend fading in.
1678-
* \returns true on success or false on failure; call SDL_GetError()
1679-
* for more information.
1676+
* \returns true on success or false on failure; call SDL_GetError() for more
1677+
* information.
16801678
*
16811679
* \since This function is available since SDL_mixer 3.0.0.
16821680
*/
@@ -1715,8 +1713,8 @@ extern SDL_DECLSPEC bool SDLCALL Mix_FadeInMusic(Mix_Music *music, int loops, in
17151713
* \param ms the number of milliseconds to spend fading in.
17161714
* \param position the start position within the music, in seconds, where
17171715
* playback should start.
1718-
* \returns true on success or false on failure; call SDL_GetError()
1719-
* for more information.
1716+
* \returns true on success or false on failure; call SDL_GetError() for more
1717+
* information.
17201718
*
17211719
* \since This function is available since SDL_mixer 3.0.0.
17221720
*/
@@ -2079,8 +2077,8 @@ extern SDL_DECLSPEC int SDLCALL Mix_FadeOutGroup(int tag, int ms);
20792077
* mixer to manage later, and returns immediately.
20802078
*
20812079
* \param ms number of milliseconds to fade before halting the channel.
2082-
* \returns true if music was scheduled to fade, false otherwise. If
2083-
* no music is currently playing, this returns false.
2080+
* \returns true if music was scheduled to fade, false otherwise. If no music
2081+
* is currently playing, this returns false.
20842082
*
20852083
* \since This function is available since SDL_mixer 3.0.0.
20862084
*/
@@ -2284,8 +2282,8 @@ extern SDL_DECLSPEC bool SDLCALL Mix_PausedMusic(void);
22842282
* This only applies to MOD music formats.
22852283
*
22862284
* \param order order.
2287-
* \returns true on success or false on failure; call SDL_GetError()
2288-
* for more information.
2285+
* \returns true on success or false on failure; call SDL_GetError() for more
2286+
* information.
22892287
*
22902288
* \since This function is available since SDL_mixer 3.0.0.
22912289
*/
@@ -2298,8 +2296,8 @@ extern SDL_DECLSPEC bool SDLCALL Mix_ModMusicJumpToOrder(int order);
22982296
*
22992297
* \param music the music object.
23002298
* \param track the track number to play. 0 is the first track.
2301-
* \returns true on success or false on failure; call SDL_GetError()
2302-
* for more information.
2299+
* \returns true on success or false on failure; call SDL_GetError() for more
2300+
* information.
23032301
*
23042302
* \since This function is available since SDL_mixer 3.0.0.
23052303
*/
@@ -2327,8 +2325,8 @@ extern SDL_DECLSPEC int SDLCALL Mix_GetNumTracks(Mix_Music *music);
23272325
* number) and for WAV, OGG, FLAC, MP3, and MODPLUG music at the moment.
23282326
*
23292327
* \param position the new position, in seconds (as a double).
2330-
* \returns true on success or false on failure; call SDL_GetError()
2331-
* for more information.
2328+
* \returns true on success or false on failure; call SDL_GetError() for more
2329+
* information.
23322330
*
23332331
* \since This function is available since SDL_mixer 3.0.0.
23342332
*/
@@ -2459,8 +2457,8 @@ extern SDL_DECLSPEC bool SDLCALL Mix_PlayingMusic(void);
24592457
* good reason.
24602458
*
24612459
* \param command command.
2462-
* \returns true on success or false on failure; call SDL_GetError()
2463-
* for more information.
2460+
* \returns true on success or false on failure; call SDL_GetError() for more
2461+
* information.
24642462
*
24652463
* \since This function is available since SDL_mixer 3.0.0.
24662464
*/
@@ -2482,8 +2480,8 @@ extern SDL_DECLSPEC bool SDLCALL Mix_SetMusicCMD(const char *command);
24822480
*
24832481
* \param paths Paths on the filesystem where SoundFonts are available,
24842482
* separated by semicolons.
2485-
* \returns true on success or false on failure; call SDL_GetError()
2486-
* for more information.
2483+
* \returns true on success or false on failure; call SDL_GetError() for more
2484+
* information.
24872485
*
24882486
* \since This function is available since SDL_mixer 3.0.0.
24892487
*/
@@ -2536,8 +2534,8 @@ typedef bool (SDLCALL *Mix_EachSoundFontCallback)(const char*, void*);
25362534
*
25372535
* \param function the callback function to call once per path.
25382536
* \param data a pointer to pass to the callback for its own personal use.
2539-
* \returns true if callback ever returned true, false on error or
2540-
* if the callback never returned true.
2537+
* \returns true if callback ever returned true, false on error or if the
2538+
* callback never returned true.
25412539
*
25422540
* \since This function is available since SDL_mixer 3.0.0.
25432541
*
@@ -2554,8 +2552,8 @@ extern SDL_DECLSPEC bool SDLCALL Mix_EachSoundFont(Mix_EachSoundFontCallback fun
25542552
* play MIDI files.
25552553
*
25562554
* \param path path to a Timidity config file.
2557-
* \returns true on success or false on failure; call SDL_GetError()
2558-
* for more information.
2555+
* \returns true on success or false on failure; call SDL_GetError() for more
2556+
* information.
25592557
*
25602558
* \since This function is available since SDL_mixer 3.0.0.
25612559
*/

0 commit comments

Comments
 (0)