Skip to main content

sdl_mixer_sys/generated/
bindings_x86_64_unknown_linux_gnu.rs

1/* automatically generated by rust-bindgen 0.72.1 */
2
3use sdl_sys_bindgen::*;
4
5pub const SDL_MIXER_MAJOR_VERSION: u32 = 3;
6pub const SDL_MIXER_MINOR_VERSION: u32 = 3;
7pub const SDL_MIXER_MICRO_VERSION: u32 = 0;
8pub const MIX_PROP_MIXER_DEVICE_NUMBER: &[u8; 23] = b"SDL_mixer.mixer.device\0";
9pub const MIX_PROP_AUDIO_LOAD_IOSTREAM_POINTER: &[u8; 30] = b"SDL_mixer.audio.load.iostream\0";
10pub const MIX_PROP_AUDIO_LOAD_CLOSEIO_BOOLEAN: &[u8; 29] = b"SDL_mixer.audio.load.closeio\0";
11pub const MIX_PROP_AUDIO_LOAD_PREDECODE_BOOLEAN: &[u8; 31] = b"SDL_mixer.audio.load.predecode\0";
12pub const MIX_PROP_AUDIO_LOAD_PREFERRED_MIXER_POINTER: &[u8; 37] =
13    b"SDL_mixer.audio.load.preferred_mixer\0";
14pub const MIX_PROP_AUDIO_LOAD_SKIP_METADATA_TAGS_BOOLEAN: &[u8; 40] =
15    b"SDL_mixer.audio.load.skip_metadata_tags\0";
16pub const MIX_PROP_AUDIO_DECODER_STRING: &[u8; 24] = b"SDL_mixer.audio.decoder\0";
17pub const MIX_PROP_METADATA_TITLE_STRING: &[u8; 25] = b"SDL_mixer.metadata.title\0";
18pub const MIX_PROP_METADATA_ARTIST_STRING: &[u8; 26] = b"SDL_mixer.metadata.artist\0";
19pub const MIX_PROP_METADATA_ALBUM_STRING: &[u8; 25] = b"SDL_mixer.metadata.album\0";
20pub const MIX_PROP_METADATA_COPYRIGHT_STRING: &[u8; 29] = b"SDL_mixer.metadata.copyright\0";
21pub const MIX_PROP_METADATA_TRACK_NUMBER: &[u8; 25] = b"SDL_mixer.metadata.track\0";
22pub const MIX_PROP_METADATA_TOTAL_TRACKS_NUMBER: &[u8; 32] = b"SDL_mixer.metadata.total_tracks\0";
23pub const MIX_PROP_METADATA_YEAR_NUMBER: &[u8; 24] = b"SDL_mixer.metadata.year\0";
24pub const MIX_PROP_METADATA_DURATION_FRAMES_NUMBER: &[u8; 35] =
25    b"SDL_mixer.metadata.duration_frames\0";
26pub const MIX_PROP_METADATA_DURATION_INFINITE_BOOLEAN: &[u8; 37] =
27    b"SDL_mixer.metadata.duration_infinite\0";
28pub const MIX_DURATION_UNKNOWN: i32 = -1;
29pub const MIX_DURATION_INFINITE: i32 = -2;
30pub const MIX_PROP_PLAY_LOOPS_NUMBER: &[u8; 21] = b"SDL_mixer.play.loops\0";
31pub const MIX_PROP_PLAY_MAX_FRAME_NUMBER: &[u8; 25] = b"SDL_mixer.play.max_frame\0";
32pub const MIX_PROP_PLAY_MAX_MILLISECONDS_NUMBER: &[u8; 32] = b"SDL_mixer.play.max_milliseconds\0";
33pub const MIX_PROP_PLAY_START_FRAME_NUMBER: &[u8; 27] = b"SDL_mixer.play.start_frame\0";
34pub const MIX_PROP_PLAY_START_MILLISECOND_NUMBER: &[u8; 33] = b"SDL_mixer.play.start_millisecond\0";
35pub const MIX_PROP_PLAY_START_ORDER_NUMBER: &[u8; 27] = b"SDL_mixer.play.start_order\0";
36pub const MIX_PROP_PLAY_LOOP_START_FRAME_NUMBER: &[u8; 32] = b"SDL_mixer.play.loop_start_frame\0";
37pub const MIX_PROP_PLAY_LOOP_START_MILLISECOND_NUMBER: &[u8; 38] =
38    b"SDL_mixer.play.loop_start_millisecond\0";
39pub const MIX_PROP_PLAY_FADE_IN_FRAMES_NUMBER: &[u8; 30] = b"SDL_mixer.play.fade_in_frames\0";
40pub const MIX_PROP_PLAY_FADE_IN_MILLISECONDS_NUMBER: &[u8; 36] =
41    b"SDL_mixer.play.fade_in_milliseconds\0";
42pub const MIX_PROP_PLAY_FADE_IN_START_GAIN_FLOAT: &[u8; 34] =
43    b"SDL_mixer.play.fade_in_start_gain\0";
44pub const MIX_PROP_PLAY_APPEND_SILENCE_FRAMES_NUMBER: &[u8; 37] =
45    b"SDL_mixer.play.append_silence_frames\0";
46pub const MIX_PROP_PLAY_APPEND_SILENCE_MILLISECONDS_NUMBER: &[u8; 43] =
47    b"SDL_mixer.play.append_silence_milliseconds\0";
48pub const MIX_PROP_PLAY_HALT_WHEN_EXHAUSTED_BOOLEAN: &[u8; 35] =
49    b"SDL_mixer.play.halt_when_exhausted\0";
50#[repr(C)]
51#[derive(Debug, Copy, Clone)]
52pub struct MIX_Mixer {
53    _unused: [u8; 0],
54}
55#[repr(C)]
56#[derive(Debug, Copy, Clone)]
57pub struct MIX_Audio {
58    _unused: [u8; 0],
59}
60#[repr(C)]
61#[derive(Debug, Copy, Clone)]
62pub struct MIX_Track {
63    _unused: [u8; 0],
64}
65#[repr(C)]
66#[derive(Debug, Copy, Clone)]
67pub struct MIX_Group {
68    _unused: [u8; 0],
69}
70unsafe extern "C" {
71    #[doc = "Get the version of SDL_mixer that is linked against your program.\n\nIf you are linking to SDL_mixer dynamically, then it is possible that the\ncurrent version will be different than the version you compiled against.\nThis function returns the current version, while SDL_MIXER_VERSION is the\nversion you compiled with.\n\nThis function may be called safely at any time, even before MIX_Init().\n\n**Returns:** the version of the linked library.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** SDL_MIXER_VERSION"]
72    pub fn MIX_Version() -> core::ffi::c_int;
73}
74unsafe extern "C" {
75    #[doc = "Initialize the SDL_mixer library.\n\nThis must be successfully called once before (almost) any other SDL_mixer\nfunction can be used.\n\nIt is safe to call this multiple times; the library will only initialize\nonce, and won't deinitialize until MIX_Quit() has been called a matching\nnumber of times. Extra attempts to init report success.\n\n**Returns:** true on success, false on error; call SDL_GetError() for details.\n\n**Thread Safety:** This function is not thread safe.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_Quit"]
76    pub fn MIX_Init() -> bool;
77}
78unsafe extern "C" {
79    #[doc = "Deinitialize the SDL_mixer library.\n\nThis must be called when done with the library, probably at the end of your\nprogram.\n\nIt is safe to call this multiple times; the library will only deinitialize\nonce, when this function is called the same number of times as MIX_Init was\nsuccessfully called.\n\nOnce you have successfully deinitialized the library, it is safe to call\nMIX_Init to reinitialize it for further use.\n\nOn successful deinitialization, SDL_mixer will destroy almost all created\nobjects, including objects of type:\n\n- MIX_Mixer\n- MIX_Track\n- MIX_Audio\n- MIX_Group\n- MIX_AudioDecoder\n\n...which is to say: it's possible a single call to this function will clean\nup anything it allocated, stop all audio output, close audio devices, etc.\nDon't attempt to destroy objects after this call. The app is still\nencouraged to manage their resources carefully and clean up first, treating\nthis function as a safety net against memory leaks.\n\n**Thread Safety:** This function is not thread safe.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_Init"]
80    pub fn MIX_Quit();
81}
82unsafe extern "C" {
83    #[doc = "Report the number of audio decoders available for use.\n\nAn audio decoder is what turns specific audio file formats into usable PCM\ndata. For example, there might be an MP3 decoder, or a WAV decoder, etc.\nSDL_mixer probably has several decoders built in.\n\nThe return value can be used to call MIX_GetAudioDecoder() in a loop.\n\nThe number of decoders available is decided during MIX_Init() and does not\nchange until the library is deinitialized.\n\n**Returns:** the number of decoders available.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_GetAudioDecoder"]
84    pub fn MIX_GetNumAudioDecoders() -> core::ffi::c_int;
85}
86unsafe extern "C" {
87    #[doc = "Report the name of a specific audio decoders.\n\nAn audio decoder is what turns specific audio file formats into usable PCM\ndata. For example, there might be an MP3 decoder, or a WAV decoder, etc.\nSDL_mixer probably has several decoders built in.\n\nThe names are capital English letters and numbers, low-ASCII. They don't\nnecessarily map to a specific file format; Some decoders, like \"XMP\"\noperate on multiple file types, and more than one decoder might handle the\nsame file type, like \"DRMP3\" vs \"MPG123\". Note that in that last example,\nneither decoder is called \"MP3\".\n\nThe index of a specific decoder is decided during MIX_Init() and does not\nchange until the library is deinitialized. Valid indices are between zero\nand the return value of MIX_GetNumAudioDecoders().\n\nThe returned pointer is const memory owned by SDL_mixer; do not free it.\n\n**Parameter:** index the index of the decoder to query.\n\n**Returns:** a UTF-8 (really, ASCII) string of the decoder's name, or NULL if\n`index` is invalid.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_GetNumAudioDecoders"]
88    pub fn MIX_GetAudioDecoder(index: core::ffi::c_int) -> *const core::ffi::c_char;
89}
90unsafe extern "C" {
91    #[doc = "Create a mixer that plays sound directly to an audio device.\n\nThis is usually the function you want, vs MIX_CreateMixer().\n\nYou can choose a specific device ID to open, following SDL's usual rules,\nbut often the correct choice is to specify\nSDL_AUDIO_DEVICE_DEFAULT_PLAYBACK and let SDL figure out what device to use\n(and seamlessly transition you to new hardware if the default changes).\n\nOnly playback devices make sense here. Attempting to open a recording\ndevice will fail.\n\nThis will call SDL_Init(SDL_INIT_AUDIO) internally; it's safe to call\nSDL_Init() before this call, too, if you intend to enumerate audio devices\nto choose one to open here.\n\nAn audio format can be requested, and the system will try to set the\nhardware to those specifications, or as close as possible, but this is just\na hint. SDL_mixer will handle all data conversion behind the scenes in any\ncase, and specifying a NULL spec is a reasonable choice. The best reason to\nspecify a format is because you know all your data is in that format and it\nmight save some unnecessary CPU time on conversion.\n\nThe actual device format chosen is available through MIX_GetMixerFormat().\n\nOnce a mixer is created, next steps are usually to load audio (through\nMIX_LoadAudio() and friends), create a track (MIX_CreateTrack()), and play\nthat audio through that track.\n\nWhen done with the mixer, it can be destroyed with MIX_DestroyMixer().\n\n**Parameter:** devid the device to open for playback, or\nSDL_AUDIO_DEVICE_DEFAULT_PLAYBACK for the default.\n\n**Parameter:** spec the audio format to request from the device. May be NULL.\n\n**Returns:** a mixer that can be used to play audio, or NULL on failure; call\nSDL_GetError() for more information.\n\n**Thread Safety:** This function should only be called on the main thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_CreateMixer\n\n**See Also:** MIX_DestroyMixer"]
92    pub fn MIX_CreateMixerDevice(
93        devid: SDL_AudioDeviceID,
94        spec: *const SDL_AudioSpec,
95    ) -> *mut MIX_Mixer;
96}
97unsafe extern "C" {
98    #[doc = "Create a mixer that generates audio to a memory buffer.\n\nUsually you want MIX_CreateMixerDevice() instead of this function. The\nmixer created here can be used with MIX_Generate() to produce more data on\ndemand, as fast as desired.\n\nAn audio format must be specified. This is the format it will output in.\nThis cannot be NULL.\n\nOnce a mixer is created, next steps are usually to load audio (through\nMIX_LoadAudio() and friends), create a track (MIX_CreateTrack()), and play\nthat audio through that track.\n\nWhen done with the mixer, it can be destroyed with MIX_DestroyMixer().\n\n**Parameter:** spec the audio format that mixer will generate.\n\n**Returns:** a mixer that can be used to generate audio, or NULL on failure;\ncall SDL_GetError() for more information.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_CreateMixerDevice\n\n**See Also:** MIX_DestroyMixer"]
99    pub fn MIX_CreateMixer(spec: *const SDL_AudioSpec) -> *mut MIX_Mixer;
100}
101unsafe extern "C" {
102    #[doc = "Free a mixer.\n\nIf this mixer was created with MIX_CreateMixerDevice(), this function will\nalso close the audio device and call SDL_QuitSubSystem(SDL_INIT_AUDIO).\n\nAny MIX_Group or MIX_Track created for this mixer will also be destroyed.\nDo not access them again or attempt to destroy them after the device is\ndestroyed. MIX_Audio objects will not be destroyed, since they can be\nshared between mixers (but those will all be destroyed during MIX_Quit()).\n\n**Parameter:** mixer the mixer to destroy.\n\n**Thread Safety:** If this is used with a MIX_Mixer from MIX_CreateMixerDevice,\nthen this function should only be called on the main thread.\nIf this is used with a MIX_Mixer from MIX_CreateMixer, then\nit is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_CreateMixerDevice\n\n**See Also:** MIX_CreateMixer"]
103    pub fn MIX_DestroyMixer(mixer: *mut MIX_Mixer);
104}
105unsafe extern "C" {
106    #[doc = "Get the properties associated with a mixer.\n\nThe following read-only properties are provided by SDL_mixer:\n\n- `MIX_PROP_MIXER_DEVICE_NUMBER`: the SDL_AudioDeviceID that this mixer has\nopened for playback. This will be zero (no device) if the mixer was\ncreated with Mix_CreateMixer() instead of Mix_CreateMixerDevice().\n\n**Parameter:** mixer the mixer to query.\n\n**Returns:** a valid property ID on success or 0 on failure; call\nSDL_GetError() for more information.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0."]
107    pub fn MIX_GetMixerProperties(mixer: *mut MIX_Mixer) -> SDL_PropertiesID;
108}
109unsafe extern "C" {
110    #[doc = "Get the audio format a mixer is generating.\n\nGenerally you don't need this information, as SDL_mixer will convert data\nas necessary between inputs you provide and its output format, but it might\nbe useful if trying to match your inputs to reduce conversion and\nresampling costs.\n\nFor mixers created with MIX_CreateMixerDevice(), this is the format of the\naudio device (and may change later if the device itself changes; SDL_mixer\nwill seamlessly handle this change internally, though).\n\nFor mixers created with MIX_CreateMixer(), this is the format that\nMIX_Generate() will produce, as requested at create time, and does not\nchange.\n\nNote that internally, SDL_mixer will work in SDL_AUDIO_F32 format before\noutputting the format specified here, so it would be more efficient to\nmatch input data to that, not the final output format.\n\n**Parameter:** mixer the mixer to query.\n\n**Parameter:** spec where to store the mixer audio format.\n\n**Returns:** true on success or false on failure; call SDL_GetError() for more\ninformation.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0."]
111    pub fn MIX_GetMixerFormat(mixer: *mut MIX_Mixer, spec: *mut SDL_AudioSpec) -> bool;
112}
113unsafe extern "C" {
114    #[doc = "Lock a mixer by obtaining its internal mutex.\n\nWhile locked, the mixer will not be able to mix more audio or change its\ninternal state in another thread. Those other threads will block until the\nmixer is unlocked again.\n\nUnder the hood, this function calls SDL_LockMutex(), so all the same rules\napply: the lock can be recursive, it must be unlocked the same number of\ntimes from the same thread that locked it, etc.\n\nJust about every SDL_mixer API _also_ locks the mixer while doing its work,\nas does the SDL audio device thread while actual mixing is in progress, so\nbasic use of this library never requires the app to explicitly lock the\ndevice to be thread safe. There are two scenarios where this can be useful,\nhowever:\n\n- The app has a provided a callback that the mixing thread might call, and\nthere is some app state that needs to be protected against race\nconditions as changes are made and mixing progresses simultaneously. Any\nlock can be used for this, but this is a conveniently-available lock.\n- The app wants to make multiple, atomic changes to the mix. For example,\nto start several tracks at the exact same moment, one would lock the\nmixer, call MIX_PlayTrack multiple times, and then unlock again; all the\ntracks will start mixing on the same sample frame.\n\nEach call to this function must be paired with a call to MIX_UnlockMixer\nfrom the same thread. It is safe to lock a mixer multiple times; it remains\nlocked until the final matching unlock call.\n\nDo not lock the mixer for significant amounts of time, or it can cause\naudio dropouts. Just do simple things quickly and unlock again.\n\nLocking a NULL mixer is a safe no-op.\n\n**Parameter:** mixer the mixer to lock. May be NULL.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_UnlockMixer"]
115    pub fn MIX_LockMixer(mixer: *mut MIX_Mixer);
116}
117unsafe extern "C" {
118    #[doc = "Unlock a mixer previously locked by a call to MIX_LockMixer().\n\nWhile locked, the mixer will not be able to mix more audio or change its\ninternal state another thread. Those other threads will block until the\nmixer is unlocked again.\n\nUnder the hood, this function calls SDL_LockMutex(), so all the same rules\napply: the lock can be recursive, it must be unlocked the same number of\ntimes from the same thread that locked it, etc.\n\nUnlocking a NULL mixer is a safe no-op.\n\n**Parameter:** mixer the mixer to unlock. May be NULL.\n\n**Thread Safety:** This call must be paired with a previous MIX_LockMixer call\non the same thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_LockMixer"]
119    pub fn MIX_UnlockMixer(mixer: *mut MIX_Mixer);
120}
121unsafe extern "C" {
122    #[doc = "Load audio for playback from an SDL_IOStream.\n\nIn normal usage, apps should load audio once, maybe at startup, then play\nit multiple times.\n\nWhen loading audio, it will be cached fully in RAM in its original data\nformat. Each time it plays, the data will be decoded. For example, an MP3\nwill be stored in memory in MP3 format and be decompressed on the fly\nduring playback. This is a tradeoff between i/o overhead and memory usage.\n\nIf `predecode` is true, the data will be decompressed during load and\nstored as raw PCM data. This might dramatically increase loading time and\nmemory usage, but there will be no need to decompress data during playback.\n\n(One could also use MIX_SetTrackIOStream() to bypass loading the data into\nRAM upfront at all, but this offers still different tradeoffs. The correct\napproach depends on the app's needs and employing different approaches in\ndifferent situations can make sense.)\n\nMIX_Audio objects can be shared between mixers. This function takes a\nMIX_Mixer, to imply this is the most likely place it will be used and\nloading should try to match its audio format, but the resulting audio can\nbe used elsewhere. If `mixer` is NULL, SDL_mixer will set reasonable\ndefaults.\n\nOnce a MIX_Audio is created, it can be assigned to a MIX_Track with\nMIX_SetTrackAudio(), or played without any management with MIX_PlayAudio().\n\nWhen done with a MIX_Audio, it can be freed with MIX_DestroyAudio().\n\nThis function loads data from an SDL_IOStream. There is also a version that\nloads from a path on the filesystem (MIX_LoadAudio()), and one that accepts\nproperties for ultimate control (MIX_LoadAudioWithProperties()).\n\nThe SDL_IOStream provided must be able to seek, or loading will fail. If\nthe stream can't seek (data is coming from an HTTP connection, etc),\nconsider caching the data to memory or disk first and creating a new stream\nto read from there.\n\n**Parameter:** mixer a mixer this audio is intended to be used with. May be NULL.\n\n**Parameter:** io the SDL_IOStream to load data from.\n\n**Parameter:** predecode if true, data will be fully uncompressed before returning.\n\n**Parameter:** closeio true if SDL_mixer should close `io` before returning\n(success or failure).\n\n**Returns:** an audio object that can be used to make sound on a mixer, or NULL\non failure; call SDL_GetError() for more information.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_DestroyAudio\n\n**See Also:** MIX_SetTrackAudio\n\n**See Also:** MIX_LoadAudio\n\n**See Also:** MIX_LoadAudioWithProperties"]
123    pub fn MIX_LoadAudio_IO(
124        mixer: *mut MIX_Mixer,
125        io: *mut SDL_IOStream,
126        predecode: bool,
127        closeio: bool,
128    ) -> *mut MIX_Audio;
129}
130unsafe extern "C" {
131    #[doc = "Load audio for playback from a file.\n\nThis is equivalent to calling:\n\n```c\nMIX_LoadAudio_IO(mixer, SDL_IOFromFile(path, \"rb\"), predecode, true);\n```\n\nThis function loads data from a path on the filesystem. There is also a\nversion that loads from an SDL_IOStream (MIX_LoadAudio_IO()), and one that\naccepts properties for ultimate control (MIX_LoadAudioWithProperties()).\n\n**Parameter:** mixer a mixer this audio is intended to be used with. May be NULL.\n\n**Parameter:** path the path on the filesystem to load data from.\n\n**Parameter:** predecode if true, data will be fully uncompressed before returning.\n\n**Returns:** an audio object that can be used to make sound on a mixer, or NULL\non failure; call SDL_GetError() for more information.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_DestroyAudio\n\n**See Also:** MIX_SetTrackAudio\n\n**See Also:** MIX_LoadAudio_IO\n\n**See Also:** MIX_LoadAudioWithProperties"]
132    pub fn MIX_LoadAudio(
133        mixer: *mut MIX_Mixer,
134        path: *const core::ffi::c_char,
135        predecode: bool,
136    ) -> *mut MIX_Audio;
137}
138unsafe extern "C" {
139    #[doc = "Load audio for playback from a memory buffer without making a copy.\n\nWhen loading audio through most other LoadAudio functions, the data will be\ncached fully in RAM in its original data format, for decoding on-demand.\nThis function does most of the same work as those functions, but instead\nuses a buffer of memory provided by the app that it does not make a copy\nof.\n\nThis buffer must live for the entire time the returned MIX_Audio lives, as\nthe mixer will access the buffer whenever it needs to mix more data.\n\nThis function is meant to maximize efficiency: if the data is already in\nmemory and can remain there, don't copy it. This data can be in any\nsupported audio file format (WAV, MP3, etc); it will be decoded on the fly\nwhile mixing. Unlike MIX_LoadAudio(), there is no `predecode` option\noffered here, as this is meant to optimize for data that's already in\nmemory and intends to exist there for significant time; since predecoding\nwould only need the file format data once, upfront, one could simply wrap\nit in SDL_CreateIOFromConstMem() and pass that to MIX_LoadAudio_IO().\n\nMIX_Audio objects can be shared between multiple mixers. The `mixer`\nparameter just suggests the most likely mixer to use this audio, in case\nsome optimization might be applied, but this is not required, and a NULL\nmixer may be specified.\n\nIf `free_when_done` is true, SDL_mixer will call `SDL_free(data)` when the\nreturned MIX_Audio is eventually destroyed. This can be useful when the\ndata is not static, but rather loaded elsewhere for this specific MIX_Audio\nand simply wants to avoid the extra copy.\n\nAs audio format information is obtained from the file format metadata, this\nisn't useful for raw PCM data; in that case, use MIX_LoadRawAudioNoCopy()\ninstead, which offers an SDL_AudioSpec.\n\nOnce a MIX_Audio is created, it can be assigned to a MIX_Track with\nMIX_SetTrackAudio(), or played without any management with MIX_PlayAudio().\n\nWhen done with a MIX_Audio, it can be freed with MIX_DestroyAudio().\n\n**Parameter:** mixer a mixer this audio is intended to be used with. May be NULL.\n\n**Parameter:** data the buffer where the audio data lives.\n\n**Parameter:** datalen the size, in bytes, of the buffer.\n\n**Parameter:** free_when_done if true, `data` will be given to SDL_free() when the\nMIX_Audio is destroyed.\n\n**Returns:** an audio object that can be used to make sound on a mixer, or NULL\non failure; call SDL_GetError() for more information.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_DestroyAudio\n\n**See Also:** MIX_SetTrackAudio\n\n**See Also:** MIX_LoadRawAudioNoCopy\n\n**See Also:** MIX_LoadAudio_IO"]
140    pub fn MIX_LoadAudioNoCopy(
141        mixer: *mut MIX_Mixer,
142        data: *const core::ffi::c_void,
143        datalen: usize,
144        free_when_done: bool,
145    ) -> *mut MIX_Audio;
146}
147unsafe extern "C" {
148    #[doc = "Load audio for playback through a collection of properties.\n\nPlease see MIX_LoadAudio_IO() for a description of what the various\nLoadAudio functions do. This function uses properties to dictate how it\noperates, and exposes functionality the other functions don't provide.\n\nSDL_PropertiesID are discussed in\n[SDL's documentation](https://wiki.libsdl.org/SDL3/CategoryProperties)\n.\n\nThese are the supported properties:\n\n- `MIX_PROP_AUDIO_LOAD_IOSTREAM_POINTER`: a pointer to an SDL_IOStream to\nbe used to load audio data. Required. This stream must be able to seek!\n- `MIX_PROP_AUDIO_LOAD_CLOSEIO_BOOLEAN`: true if SDL_mixer should close the\nSDL_IOStream before returning (success or failure).\n- `MIX_PROP_AUDIO_LOAD_PREDECODE_BOOLEAN`: true if SDL_mixer should fully\ndecode and decompress the data before returning. Otherwise it will be\nstored in its original state and decompressed on demand.\n- `MIX_PROP_AUDIO_LOAD_PREFERRED_MIXER_POINTER`: a pointer to a MIX_Mixer,\nin case steps can be made to match its format when decoding. Optional.\n- `MIX_PROP_AUDIO_LOAD_SKIP_METADATA_TAGS_BOOLEAN`: true to skip parsing\nmetadata tags, like ID3 and APE tags. This can be used to speed up\nloading _if the data definitely doesn't have these tags_. Some decoders\nwill fail if these tags are present when this property is true.\n- `MIX_PROP_AUDIO_DECODER_STRING`: the name of the decoder to use for this\ndata. Optional. If not specified, SDL_mixer will examine the data and\nchoose the best decoder. These names are the same returned from\nMIX_GetAudioDecoder().\n\nSpecific decoders might accept additional custom properties, such as where\nto find soundfonts for MIDI playback, etc.\n\n**Parameter:** props a set of properties on how to load audio.\n\n**Returns:** an audio object that can be used to make sound on a mixer, or NULL\non failure; call SDL_GetError() for more information.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_DestroyAudio\n\n**See Also:** MIX_SetTrackAudio\n\n**See Also:** MIX_LoadAudio\n\n**See Also:** MIX_LoadAudio_IO"]
149    pub fn MIX_LoadAudioWithProperties(props: SDL_PropertiesID) -> *mut MIX_Audio;
150}
151unsafe extern "C" {
152    #[doc = "Load raw PCM data from an SDL_IOStream.\n\nThere are other options for _streaming_ raw PCM: an SDL_AudioStream can be\nconnected to a track, as can an SDL_IOStream, and will read from those\nsources on-demand when it is time to mix the audio. This function is useful\nfor loading static audio data that is meant to be played multiple times.\n\nThis function will load the raw data in its entirety and cache it in RAM.\n\nMIX_Audio objects can be shared between multiple mixers. The `mixer`\nparameter just suggests the most likely mixer to use this audio, in case\nsome optimization might be applied, but this is not required, and a NULL\nmixer may be specified.\n\n**Parameter:** mixer a mixer this audio is intended to be used with. May be NULL.\n\n**Parameter:** io the SDL_IOStream to load data from.\n\n**Parameter:** spec what format the raw data is in.\n\n**Parameter:** closeio true if SDL_mixer should close `io` before returning\n(success or failure).\n\n**Returns:** an audio object that can be used to make sound on a mixer, or NULL\non failure; call SDL_GetError() for more information.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_DestroyAudio\n\n**See Also:** MIX_SetTrackAudio\n\n**See Also:** MIX_LoadRawAudio\n\n**See Also:** MIX_LoadRawAudioNoCopy\n\n**See Also:** MIX_LoadAudio_IO"]
153    pub fn MIX_LoadRawAudio_IO(
154        mixer: *mut MIX_Mixer,
155        io: *mut SDL_IOStream,
156        spec: *const SDL_AudioSpec,
157        closeio: bool,
158    ) -> *mut MIX_Audio;
159}
160unsafe extern "C" {
161    #[doc = "Load raw PCM data from a memory buffer.\n\nThere are other options for _streaming_ raw PCM: an SDL_AudioStream can be\nconnected to a track, as can an SDL_IOStream, and will read from those\nsources on-demand when it is time to mix the audio. This function is useful\nfor loading static audio data that is meant to be played multiple times.\n\nThis function will load the raw data in its entirety and cache it in RAM,\nallocating a copy. If the original data will outlive the created MIX_Audio,\nyou can use MIX_LoadRawAudioNoCopy() to avoid extra allocations and copies.\n\nMIX_Audio objects can be shared between multiple mixers. The `mixer`\nparameter just suggests the most likely mixer to use this audio, in case\nsome optimization might be applied, but this is not required, and a NULL\nmixer may be specified.\n\n**Parameter:** mixer a mixer this audio is intended to be used with. May be NULL.\n\n**Parameter:** data the raw PCM data to load.\n\n**Parameter:** datalen the size, in bytes, of the raw PCM data.\n\n**Parameter:** spec what format the raw data is in.\n\n**Returns:** an audio object that can be used to make sound on a mixer, or NULL\non failure; call SDL_GetError() for more information.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_DestroyAudio\n\n**See Also:** MIX_SetTrackAudio\n\n**See Also:** MIX_LoadRawAudio_IO\n\n**See Also:** MIX_LoadRawAudioNoCopy\n\n**See Also:** MIX_LoadAudio_IO"]
162    pub fn MIX_LoadRawAudio(
163        mixer: *mut MIX_Mixer,
164        data: *const core::ffi::c_void,
165        datalen: usize,
166        spec: *const SDL_AudioSpec,
167    ) -> *mut MIX_Audio;
168}
169unsafe extern "C" {
170    #[doc = "Load raw PCM data from a memory buffer without making a copy.\n\nThis buffer must live for the entire time the returned MIX_Audio lives, as\nthe mixer will access the buffer whenever it needs to mix more data.\n\nThis function is meant to maximize efficiency: if the data is already in\nmemory and can remain there, don't copy it. But it can also lead to some\ninteresting tricks, like changing the buffer's contents to alter multiple\nplaying tracks at once. (But, of course, be careful when being too clever.)\n\nMIX_Audio objects can be shared between multiple mixers. The `mixer`\nparameter just suggests the most likely mixer to use this audio, in case\nsome optimization might be applied, but this is not required, and a NULL\nmixer may be specified.\n\nIf `free_when_done` is true, SDL_mixer will call `SDL_free(data)` when the\nreturned MIX_Audio is eventually destroyed. This can be useful when the\ndata is not static, but rather composed dynamically for this specific\nMIX_Audio and simply wants to avoid the extra copy.\n\n**Parameter:** mixer a mixer this audio is intended to be used with. May be NULL.\n\n**Parameter:** data the buffer where the raw PCM data lives.\n\n**Parameter:** datalen the size, in bytes, of the buffer.\n\n**Parameter:** spec what format the raw data is in.\n\n**Parameter:** free_when_done if true, `data` will be given to SDL_free() when the\nMIX_Audio is destroyed.\n\n**Returns:** an audio object that can be used to make sound on a mixer, or NULL\non failure; call SDL_GetError() for more information.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_DestroyAudio\n\n**See Also:** MIX_SetTrackAudio\n\n**See Also:** MIX_LoadRawAudio\n\n**See Also:** MIX_LoadRawAudio_IO\n\n**See Also:** MIX_LoadAudio_IO"]
171    pub fn MIX_LoadRawAudioNoCopy(
172        mixer: *mut MIX_Mixer,
173        data: *const core::ffi::c_void,
174        datalen: usize,
175        spec: *const SDL_AudioSpec,
176        free_when_done: bool,
177    ) -> *mut MIX_Audio;
178}
179unsafe extern "C" {
180    #[doc = "Create a MIX_Audio that generates a sinewave.\n\nThis is useful just to have _something_ to play, perhaps for testing or\ndebugging purposes.\n\nYou specify its frequency in Hz (determines the pitch of the sinewave's\naudio) and amplitude (determines the volume of the sinewave: 1.0f is very\nloud, 0.0f is silent).\n\nA number of milliseconds of audio to generate can be specified. Specifying\na value less than zero will generate infinite audio (when assigned to a\nMIX_Track, the sinewave will play forever).\n\nMIX_Audio objects can be shared between multiple mixers. The `mixer`\nparameter just suggests the most likely mixer to use this audio, in case\nsome optimization might be applied, but this is not required, and a NULL\nmixer may be specified.\n\n**Parameter:** mixer a mixer this audio is intended to be used with. May be NULL.\n\n**Parameter:** hz the sinewave's frequency in Hz.\n\n**Parameter:** amplitude the sinewave's amplitude from 0.0f to 1.0f.\n\n**Parameter:** ms the maximum number of milliseconds of audio to generate, or less\nthan zero to generate infinite audio.\n\n**Returns:** an audio object that can be used to make sound on a mixer, or NULL\non failure; call SDL_GetError() for more information.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_DestroyAudio\n\n**See Also:** MIX_SetTrackAudio\n\n**See Also:** MIX_LoadAudio_IO"]
181    pub fn MIX_CreateSineWaveAudio(
182        mixer: *mut MIX_Mixer,
183        hz: core::ffi::c_int,
184        amplitude: f32,
185        ms: Sint64,
186    ) -> *mut MIX_Audio;
187}
188unsafe extern "C" {
189    #[doc = "Get the properties associated with a MIX_Audio.\n\nSDL_mixer offers some properties of its own, but this can also be a\nconvenient place to store app-specific data.\n\nA SDL_PropertiesID is created the first time this function is called for a\ngiven MIX_Audio, if necessary.\n\nThe following read-only properties are provided by SDL_mixer:\n\n- `MIX_PROP_METADATA_TITLE_STRING`: the audio's title (\"Smells Like Teen\nSpirit\").\n- `MIX_PROP_METADATA_ARTIST_STRING`: the audio's artist name (\"Nirvana\").\n- `MIX_PROP_METADATA_ALBUM_STRING`: the audio's album name (\"Nevermind\").\n- `MIX_PROP_METADATA_COPYRIGHT_STRING`: the audio's copyright info\n(\"Copyright (c) 1991\")\n- `MIX_PROP_METADATA_TRACK_NUMBER`: the audio's track number on the album\n(1)\n- `MIX_PROP_METADATA_TOTAL_TRACKS_NUMBER`: the total tracks on the album\n(13)\n- `MIX_PROP_METADATA_YEAR_NUMBER`: the year the audio was released (1991)\n- `MIX_PROP_METADATA_DURATION_FRAMES_NUMBER`: The sample frames worth of\nPCM data that comprise this audio. It might be off by a little if the\ndecoder only knows the duration as a unit of time.\n- `MIX_PROP_METADATA_DURATION_INFINITE_BOOLEAN`: if true, audio never runs\nout of sound to generate. This isn't necessarily always known to\nSDL_mixer, though.\n\nOther properties, documented with MIX_LoadAudioWithProperties(), may also\nbe present.\n\nNote that the metadata properties are whatever SDL_mixer finds in things\nlike ID3 tags, and they often have very little standardized formatting, may\nbe missing, and can be completely wrong if the original data is\nuntrustworthy (like an MP3 from a P2P file sharing service).\n\n**Parameter:** audio the audio to query.\n\n**Returns:** a valid property ID on success or 0 on failure; call\nSDL_GetError() for more information.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0."]
190    pub fn MIX_GetAudioProperties(audio: *mut MIX_Audio) -> SDL_PropertiesID;
191}
192unsafe extern "C" {
193    #[doc = "Get the length of a MIX_Audio's playback in sample frames.\n\nThis information is also available via the\nMIX_PROP_METADATA_DURATION_FRAMES_NUMBER property, but it's common enough\nto provide a simple accessor function.\n\nThis reports the length of the data in _sample frames_, so sample-perfect\nmixing can be possible. Sample frames are only meaningful as a measure of\ntime if the sample rate (frequency) is also known. To convert from sample\nframes to milliseconds, use MIX_AudioFramesToMS().\n\nNot all audio file formats can report the complete length of the data they\nwill produce through decoding: some can't calculate it, some might produce\ninfinite audio.\n\nAlso, some file formats can only report duration as a unit of time, which\nmeans SDL_mixer might have to estimate sample frames from that information.\nWith less precision, the reported duration might be off by a few sample\nframes in either direction.\n\nThis will return a value >= 0 if a duration is known. It might also return\nMIX_DURATION_UNKNOWN or MIX_DURATION_INFINITE.\n\n**Parameter:** audio the audio to query.\n\n**Returns:** the length of the audio in sample frames, or MIX_DURATION_UNKNOWN\nor MIX_DURATION_INFINITE.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0."]
194    pub fn MIX_GetAudioDuration(audio: *mut MIX_Audio) -> Sint64;
195}
196unsafe extern "C" {
197    #[doc = "Query the initial audio format of a MIX_Audio.\n\nNote that some audio files can change format in the middle; some explicitly\nsupport this, but a more common example is two MP3 files concatenated\ntogether. In many cases, SDL_mixer will correctly handle these sort of\nfiles, but this function will only report the initial format a file uses.\n\n**Parameter:** audio the audio to query.\n\n**Parameter:** spec on success, audio format details will be stored here.\n\n**Returns:** true on success or false on failure; call SDL_GetError() for more\ninformation.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0."]
198    pub fn MIX_GetAudioFormat(audio: *mut MIX_Audio, spec: *mut SDL_AudioSpec) -> bool;
199}
200unsafe extern "C" {
201    #[doc = "Destroy the specified audio.\n\nMIX_Audio is reference-counted internally, so this function only unrefs it.\nIf doing so causes the reference count to drop to zero, the MIX_Audio will\nbe deallocated. This allows the system to safely operate if the audio is\nstill assigned to a MIX_Track at the time of destruction. The actual\ndestroying will happen when the track stops using it.\n\nBut from the caller's perspective, once this function is called, it should\nassume the `audio` pointer has become invalid.\n\nDestroying a NULL MIX_Audio is a legal no-op.\n\n**Parameter:** audio the audio to destroy.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0."]
202    pub fn MIX_DestroyAudio(audio: *mut MIX_Audio);
203}
204unsafe extern "C" {
205    #[doc = "Create a new track on a mixer.\n\nA track provides a single source of audio. All currently-playing tracks\nwill be processed and mixed together to form the final output from the\nmixer.\n\nThere are no limits to the number of tracks one may create, beyond running\nout of memory, but in normal practice there are a small number of tracks\nthat are reused between all loaded audio as appropriate.\n\nTracks are unique to a specific MIX_Mixer and can't be transferred between\nthem.\n\n**Parameter:** mixer the mixer on which to create this track.\n\n**Returns:** a new MIX_Track on success, NULL on error; call SDL_GetError() for\nmore informations.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_DestroyTrack"]
206    pub fn MIX_CreateTrack(mixer: *mut MIX_Mixer) -> *mut MIX_Track;
207}
208unsafe extern "C" {
209    #[doc = "Destroy the specified track.\n\nIf the track is currently playing, it will be stopped immediately, without\nany fadeout. If there is a callback set through\nMIX_SetTrackStoppedCallback(), it will _not_ be called.\n\nIf the mixer is currently mixing in another thread, this will block until\nit finishes. Destroying a track from the mixer thread itself (during a\ncallback) will cause it to be destroyed as soon as this iteration of the\nmixer thread is not using it; in this scenario, destroying a track and then\nmaking futher changes to it is considered undefined behavior.\n\nDestroying a NULL MIX_Track is a legal no-op.\n\n**Parameter:** track the track to destroy.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0."]
210    pub fn MIX_DestroyTrack(track: *mut MIX_Track);
211}
212unsafe extern "C" {
213    #[doc = "Get the properties associated with a track.\n\nCurrently SDL_mixer assigns no properties of its own to a track, but this\ncan be a convenient place to store app-specific data.\n\nA SDL_PropertiesID is created the first time this function is called for a\ngiven track.\n\n**Parameter:** track the track to query.\n\n**Returns:** a valid property ID on success or 0 on failure; call\nSDL_GetError() for more information.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0."]
214    pub fn MIX_GetTrackProperties(track: *mut MIX_Track) -> SDL_PropertiesID;
215}
216unsafe extern "C" {
217    #[doc = "Get the MIX_Mixer that owns a MIX_Track.\n\nThis is the mixer pointer that was passed to MIX_CreateTrack().\n\n**Parameter:** track the track to query.\n\n**Returns:** the mixer associated with the track, or NULL on error; call\nSDL_GetError() for more information.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0."]
218    pub fn MIX_GetTrackMixer(track: *mut MIX_Track) -> *mut MIX_Mixer;
219}
220unsafe extern "C" {
221    #[doc = "Set a MIX_Track's input to a MIX_Audio.\n\nA MIX_Audio is audio data stored in RAM (possibly still in a compressed\nform). One MIX_Audio can be assigned to multiple tracks at once.\n\nOnce a track has a valid input, it can start mixing sound by calling\nMIX_PlayTrack(), or possibly MIX_PlayTag().\n\nCalling this function with a NULL audio input is legal, and removes any\ninput from the track. If the track was currently playing, the next time the\nmixer runs, it'll notice this and mark the track as stopped, calling any\nassigned MIX_TrackStoppedCallback.\n\nIt is legal to change the input of a track while it's playing, however some\nstates, like loop points, may cease to make sense with the new audio. In\nsuch a case, one can call MIX_PlayTrack again to adjust parameters.\n\nThe track will hold a reference to the provided MIX_Audio, so it is safe to\ncall MIX_DestroyAudio() on it while the track is still using it. The track\nwill drop its reference (and possibly free the resources) once it is no\nlonger using the MIX_Audio.\n\n**Parameter:** track the track on which to set a new audio input.\n\n**Parameter:** audio the new audio input to set. May be NULL.\n\n**Returns:** true on success, false on error; call SDL_GetError() for details.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0."]
222    pub fn MIX_SetTrackAudio(track: *mut MIX_Track, audio: *mut MIX_Audio) -> bool;
223}
224unsafe extern "C" {
225    #[doc = "Set a MIX_Track's input to an SDL_AudioStream.\n\nUsing an audio stream allows the application to generate any type of audio,\nin any format, possibly procedurally or on-demand, and mix in with all\nother tracks.\n\nWhen a track uses an audio stream, it will call SDL_GetAudioStreamData as\nit needs more audio to mix. The app can either buffer data to the stream\nahead of time, or set a callback on the stream to provide data as needed.\nPlease refer to SDL's documentation for details.\n\nA given audio stream may only be assigned to a single track at a time;\nduplicate assignments won't return an error, but assigning a stream to\nmultiple tracks will cause each track to read from the stream arbitrarily,\ncausing confusion and incorrect mixing.\n\nOnce a track has a valid input, it can start mixing sound by calling\nMIX_PlayTrack(), or possibly MIX_PlayTag().\n\nCalling this function with a NULL audio stream is legal, and removes any\ninput from the track. If the track was currently playing, the next time the\nmixer runs, it'll notice this and mark the track as stopped, calling any\nassigned MIX_TrackStoppedCallback.\n\nIt is legal to change the input of a track while it's playing, however some\nstates, like loop points, may cease to make sense with the new audio. In\nsuch a case, one can call MIX_PlayTrack again to adjust parameters.\n\nThe provided audio stream must remain valid until the track no longer needs\nit (either by changing the track's input or destroying the track).\n\n**Parameter:** track the track on which to set a new audio input.\n\n**Parameter:** stream the audio stream to use as the track's input.\n\n**Returns:** true on success, false on error; call SDL_GetError() for details.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0."]
226    pub fn MIX_SetTrackAudioStream(track: *mut MIX_Track, stream: *mut SDL_AudioStream) -> bool;
227}
228unsafe extern "C" {
229    #[doc = "Set a MIX_Track's input to an SDL_IOStream.\n\nThis is not the recommended way to set a track's input, but this can be\nuseful for a very specific scenario: a large file, to be played once, that\nmust be read from disk in small chunks as needed. In most cases, however,\nit is preferable to create a MIX_Audio ahead of time and use\nMIX_SetTrackAudio() instead.\n\nThe stream supplied here should provide an audio file in a supported\nformat. SDL_mixer will parse it during this call to make sure it's valid,\nand then will read file data from the stream as it needs to decode more\nduring mixing.\n\nThe stream must be able to seek through the complete set of data, or this\nfunction will fail.\n\nA given IOStream may only be assigned to a single track at a time;\nduplicate assignments won't return an error, but assigning a stream to\nmultiple tracks will cause each track to read from the stream arbitrarily,\ncausing confusion, incorrect mixing, or failure to decode.\n\nOnce a track has a valid input, it can start mixing sound by calling\nMIX_PlayTrack(), or possibly MIX_PlayTag().\n\nCalling this function with a NULL stream is legal, and removes any input\nfrom the track. If the track was currently playing, the next time the mixer\nruns, it'll notice this and mark the track as stopped, calling any assigned\nMIX_TrackStoppedCallback.\n\nIt is legal to change the input of a track while it's playing, however some\nstates, like loop points, may cease to make sense with the new audio. In\nsuch a case, one can call MIX_PlayTrack again to adjust parameters.\n\nThe provided stream must remain valid until the track no longer needs it\n(either by changing the track's input or destroying the track).\n\n**Parameter:** track the track on which to set a new audio input.\n\n**Parameter:** io the new i/o stream to use as the track's input.\n\n**Parameter:** closeio if true, close the stream when done with it.\n\n**Returns:** true on success, false on error; call SDL_GetError() for details.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_SetTrackRawIOStream"]
230    pub fn MIX_SetTrackIOStream(
231        track: *mut MIX_Track,
232        io: *mut SDL_IOStream,
233        closeio: bool,
234    ) -> bool;
235}
236unsafe extern "C" {
237    #[doc = "Set a MIX_Track's input to an SDL_IOStream providing raw PCM data.\n\nThis is not the recommended way to set a track's input, but this can be\nuseful for a very specific scenario: a large file, to be played once, that\nmust be read from disk in small chunks as needed. In most cases, however,\nit is preferable to create a MIX_Audio ahead of time and use\nMIX_SetTrackAudio() instead.\n\nAlso, an MIX_SetTrackAudioStream() can _also_ provide raw PCM audio to a\ntrack, via an SDL_AudioStream, which might be preferable unless the data is\nalready coming directly from an SDL_IOStream.\n\nThe stream supplied here should provide an audio in raw PCM format.\n\nA given IOStream may only be assigned to a single track at a time;\nduplicate assignments won't return an error, but assigning a stream to\nmultiple tracks will cause each track to read from the stream arbitrarily,\ncausing confusion and incorrect mixing.\n\nOnce a track has a valid input, it can start mixing sound by calling\nMIX_PlayTrack(), or possibly MIX_PlayTag().\n\nCalling this function with a NULL stream is legal, and removes any input\nfrom the track. If the track was currently playing, the next time the mixer\nruns, it'll notice this and mark the track as stopped, calling any assigned\nMIX_TrackStoppedCallback.\n\nIt is legal to change the input of a track while it's playing, however some\nstates, like loop points, may cease to make sense with the new audio. In\nsuch a case, one can call MIX_PlayTrack again to adjust parameters.\n\nThe provided stream must remain valid until the track no longer needs it\n(either by changing the track's input or destroying the track).\n\n**Parameter:** track the track on which to set a new audio input.\n\n**Parameter:** io the new i/o stream to use as the track's input.\n\n**Parameter:** spec the format of the PCM data that the SDL_IOStream will provide.\n\n**Parameter:** closeio if true, close the stream when done with it.\n\n**Returns:** true on success, false on error; call SDL_GetError() for details.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_SetTrackAudioStream\n\n**See Also:** MIX_SetTrackIOStream"]
238    pub fn MIX_SetTrackRawIOStream(
239        track: *mut MIX_Track,
240        io: *mut SDL_IOStream,
241        spec: *const SDL_AudioSpec,
242        closeio: bool,
243    ) -> bool;
244}
245unsafe extern "C" {
246    #[doc = "Assign an arbitrary tag to a track.\n\nA tag can be any valid C string in UTF-8 encoding. It can be useful to\ngroup tracks in various ways. For example, everything in-game might be\nmarked as \"game\", so when the user brings up the settings menu, the app can\npause all tracks involved in gameplay at once, but keep background music\nand menu sound effects running.\n\nA track can have as many tags as desired, until the machine runs out of\nmemory.\n\nIt's legal to add the same tag to a track more than once; the extra\nattempts will report success but not change anything.\n\nTags can later be removed with MIX_UntagTrack().\n\n**Parameter:** track the track to add a tag to.\n\n**Parameter:** tag the tag to add.\n\n**Returns:** true on success, false on error; call SDL_GetError() for details.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_UntagTrack"]
247    pub fn MIX_TagTrack(track: *mut MIX_Track, tag: *const core::ffi::c_char) -> bool;
248}
249unsafe extern "C" {
250    #[doc = "Remove an arbitrary tag from a track.\n\nA tag can be any valid C string in UTF-8 encoding. It can be useful to\ngroup tracks in various ways. For example, everything in-game might be\nmarked as \"game\", so when the user brings up the settings menu, the app can\npause all tracks involved in gameplay at once, but keep background music\nand menu sound effects running.\n\nIt's legal to remove a tag that the track doesn't have; this function\ndoesn't report errors, so this simply does nothing.\n\nSpecifying a NULL tag will remove all tags on a track.\n\n**Parameter:** track the track from which to remove a tag.\n\n**Parameter:** tag the tag to remove, or NULL to remove all current tags.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_TagTrack"]
251    pub fn MIX_UntagTrack(track: *mut MIX_Track, tag: *const core::ffi::c_char);
252}
253unsafe extern "C" {
254    #[doc = "Get the tags currently associated with a track.\n\nTags are not provided in any guaranteed order.\n\n**Parameter:** track the track to query.\n\n**Parameter:** count a pointer filled in with the number of tags returned, can be\nNULL.\n\n**Returns:** an array of the tags, NULL-terminated, or NULL on failure; call\nSDL_GetError() for more information. This is a single allocation\nthat should be freed with SDL_free() when it is no longer needed.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0."]
255    pub fn MIX_GetTrackTags(
256        track: *mut MIX_Track,
257        count: *mut core::ffi::c_int,
258    ) -> *mut *mut core::ffi::c_char;
259}
260unsafe extern "C" {
261    #[doc = "Get all tracks with a specific tag.\n\nTracks are not provided in any guaranteed order.\n\n**Parameter:** mixer the mixer to query.\n\n**Parameter:** tag the tag to search.\n\n**Parameter:** count a pointer filled in with the number of tracks returned, can be\nNULL.\n\n**Returns:** an array of the tracks, NULL-terminated, or NULL on failure; call\nSDL_GetError() for more information. The returned pointer should\nbe freed with SDL_free() when it is no longer needed.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0."]
262    pub fn MIX_GetTaggedTracks(
263        mixer: *mut MIX_Mixer,
264        tag: *const core::ffi::c_char,
265        count: *mut core::ffi::c_int,
266    ) -> *mut *mut MIX_Track;
267}
268unsafe extern "C" {
269    #[doc = "Seek a playing track to a new position in its input.\n\n(Not to be confused with MIX_SetTrack3DPosition(), which is positioning of\nthe track in 3D space, not the playback position of its audio data.)\n\nOn a playing track, the next time the mixer runs, it will start mixing from\nthe new position.\n\nPosition is defined in _sample frames_ of decoded audio, not units of time,\nso that sample-perfect mixing can be achieved. To instead operate in units\nof time, use MIX_TrackMSToFrames() to get the approximate sample frames for\na given tick.\n\nThis function requires an input that can seek (so it can not be used if the\ninput was set with MIX_SetTrackAudioStream()), and a audio file format that\nallows seeking. SDL_mixer's decoders for some file formats do not offer\nseeking, or can only seek to times, not exact sample frames, in which case\nthe final position may be off by some amount of sample frames. Please check\nyour audio data and file bug reports if appropriate.\n\nIt's legal to call this function on a track that is stopped, but a future\ncall to MIX_PlayTrack() will reset the start position anyhow. Paused tracks\nwill resume at the new input position.\n\n**Parameter:** track the track to change.\n\n**Parameter:** frames the sample frame position to seek to.\n\n**Returns:** true on success, false on error; call SDL_GetError() for details.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_GetTrackPlaybackPosition"]
270    pub fn MIX_SetTrackPlaybackPosition(track: *mut MIX_Track, frames: Sint64) -> bool;
271}
272unsafe extern "C" {
273    #[doc = "Get the current input position of a playing track.\n\n(Not to be confused with MIX_GetTrack3DPosition(), which is positioning of\nthe track in 3D space, not the playback position of its audio data.)\n\nPosition is defined in _sample frames_ of decoded audio, not units of time,\nso that sample-perfect mixing can be achieved. To instead operate in units\nof time, use MIX_TrackFramesToMS() to convert the return value to\nmilliseconds.\n\nStopped and paused tracks will report the position when they halted.\nPlaying tracks will report the current position, which will change over\ntime.\n\n**Parameter:** track the track to change.\n\n**Returns:** the track's current sample frame position, or -1 on error; call\nSDL_GetError() for details.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_SetTrackPlaybackPosition"]
274    pub fn MIX_GetTrackPlaybackPosition(track: *mut MIX_Track) -> Sint64;
275}
276unsafe extern "C" {
277    #[doc = "Query whether a given track is fading.\n\nThis specifically checks if the track is _not stopped_ (paused or playing),\nand it is fading in or out, and returns the number of frames remaining in\nthe fade.\n\nIf fading out, the returned value will be negative. When fading in, the\nreturned value will be positive. If not fading, this function returns zero.\n\nOn various errors (MIX_Init() was not called, the track is NULL), this\nreturns 0, but there is no mechanism to distinguish errors from tracks that\naren't fading.\n\n**Parameter:** track the track to query.\n\n**Returns:** less than 0 if the track is fading out, greater than 0 if fading\nin, zero otherwise.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0."]
278    pub fn MIX_GetTrackFadeFrames(track: *mut MIX_Track) -> Sint64;
279}
280unsafe extern "C" {
281    #[doc = "Query how many loops remain for a given track.\n\nThis returns the number of loops still pending; if a track will eventually\ncomplete and loop to play again one more time, this will return 1. If a\ntrack _was_ looping but is on its final iteration of the loop (will stop\nwhen this iteration completes), this will return zero.\n\nA track that is looping infinitely will return -1. This value does not\nreport an error in this case.\n\nA track that is stopped (not playing and not paused) will have zero loops\nremaining.\n\nOn various errors (MIX_Init() was not called, the track is NULL), this\nreturns zero, but there is no mechanism to distinguish errors from\nnon-looping tracks.\n\n**Parameter:** track the track to query.\n\n**Returns:** the number of pending loops, zero if not looping, and -1 if\nlooping infinitely.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0."]
282    pub fn MIX_GetTrackLoops(track: *mut MIX_Track) -> core::ffi::c_int;
283}
284unsafe extern "C" {
285    #[doc = "Change the number of times a currently-playing track will loop.\n\nThis replaces any previously-set remaining loops. A value of 1 will loop to\nthe start of playback one time. Zero will not loop at all. A value of -1\nrequests infinite loops. If the input is not seekable and `num_loops` isn't\nzero, this function will report success but the track will stop at the\npoint it should loop.\n\nThe new loop count replaces any previous state, even if the track has\nalready looped.\n\nThis has no effect on a track that is stopped, or rather, starting a\nstopped track later will set a new loop count, replacing this value.\nStopped tracks can specify a loop count while starting via\nMIX_PROP_PLAY_LOOPS_NUMBER. This function is intended to alter that count\nin the middle of playback.\n\n**Parameter:** track the track to configure.\n\n**Parameter:** num_loops new number of times to loop. Zero to disable looping, -1\nto loop infinitely.\n\n**Returns:** true on success, false on error; call SDL_GetError() for details.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_GetTrackLoops"]
286    pub fn MIX_SetTrackLoops(track: *mut MIX_Track, num_loops: core::ffi::c_int) -> bool;
287}
288unsafe extern "C" {
289    #[doc = "Query the MIX_Audio assigned to a track.\n\nThis returns the MIX_Audio object currently assigned to `track` through a\ncall to MIX_SetTrackAudio(). If there is none assigned, or the track has an\ninput that isn't a MIX_Audio (such as an SDL_AudioStream or SDL_IOStream),\nthis will return NULL.\n\nOn various errors (MIX_Init() was not called, the track is NULL), this\nreturns NULL, but there is no mechanism to distinguish errors from tracks\nwithout a valid input.\n\n**Parameter:** track the track to query.\n\n**Returns:** a MIX_Audio if available, NULL if not.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_GetTrackAudioStream"]
290    pub fn MIX_GetTrackAudio(track: *mut MIX_Track) -> *mut MIX_Audio;
291}
292unsafe extern "C" {
293    #[doc = "Query the SDL_AudioStream assigned to a track.\n\nThis returns the SDL_AudioStream object currently assigned to `track`\nthrough a call to MIX_SetTrackAudioStream(). If there is none assigned, or\nthe track has an input that isn't an SDL_AudioStream (such as a MIX_Audio\nor SDL_IOStream), this will return NULL.\n\nOn various errors (MIX_Init() was not called, the track is NULL), this\nreturns NULL, but there is no mechanism to distinguish errors from tracks\nwithout a valid input.\n\n**Parameter:** track the track to query.\n\n**Returns:** an SDL_AudioStream if available, NULL if not.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_GetTrackAudio"]
294    pub fn MIX_GetTrackAudioStream(track: *mut MIX_Track) -> *mut SDL_AudioStream;
295}
296unsafe extern "C" {
297    #[doc = "Return the number of sample frames remaining to be mixed in a track.\n\nIf the track is playing or paused, and its total duration is known, this\nwill report how much audio is left to mix. If the track is playing, future\ncalls to this function will report different values.\n\nRemaining audio is defined in _sample frames_ of decoded audio, not units\nof time, so that sample-perfect mixing can be achieved. To instead operate\nin units of time, use MIX_TrackFramesToMS() to convert the return value to\nmilliseconds.\n\nThis function does not take into account fade-outs or looping, just the\ncurrent mixing position vs the duration of the track.\n\nIf the duration of the track isn't known, or `track` is NULL, this function\nreturns -1. A stopped track reports 0.\n\n**Parameter:** track the track to query.\n\n**Returns:** the total sample frames still to be mixed, or -1 if unknown.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0."]
298    pub fn MIX_GetTrackRemaining(track: *mut MIX_Track) -> Sint64;
299}
300unsafe extern "C" {
301    #[doc = "Convert milliseconds to sample frames for a track's current format.\n\nThis calculates time based on the track's current input format, which can\nchange when its input does, and also if that input changes formats\nmid-stream (for example, if decoding a file that is two MP3s concatenated\ntogether).\n\nOn various errors (MIX_Init() was not called, the track is NULL), this\nreturns -1. If the track has no input, this returns -1. If `ms` is < 0,\nthis returns -1.\n\n**Parameter:** track the track to query.\n\n**Parameter:** ms the milliseconds to convert to track-specific sample frames.\n\n**Returns:** Converted number of sample frames, or -1 for errors/no input; call\nSDL_GetError() for details.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_TrackFramesToMS"]
302    pub fn MIX_TrackMSToFrames(track: *mut MIX_Track, ms: Sint64) -> Sint64;
303}
304unsafe extern "C" {
305    #[doc = "Convert sample frames for a track's current format to milliseconds.\n\nThis calculates time based on the track's current input format, which can\nchange when its input does, and also if that input changes formats\nmid-stream (for example, if decoding a file that is two MP3s concatenated\ntogether).\n\nSample frames are more precise than milliseconds, so out of necessity, this\nfunction will approximate by rounding down to the closest full millisecond.\n\nOn various errors (MIX_Init() was not called, the track is NULL), this\nreturns -1. If the track has no input, this returns -1. If `frames` is < 0,\nthis returns -1.\n\n**Parameter:** track the track to query.\n\n**Parameter:** frames the track-specific sample frames to convert to milliseconds.\n\n**Returns:** Converted number of milliseconds, or -1 for errors/no input; call\nSDL_GetError() for details.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_TrackMSToFrames"]
306    pub fn MIX_TrackFramesToMS(track: *mut MIX_Track, frames: Sint64) -> Sint64;
307}
308unsafe extern "C" {
309    #[doc = "Convert milliseconds to sample frames for a MIX_Audio's format.\n\nThis calculates time based on the audio's initial format, even if the\nformat would change mid-stream.\n\nIf `ms` is < 0, this returns -1.\n\n**Parameter:** audio the audio to query.\n\n**Parameter:** ms the milliseconds to convert to audio-specific sample frames.\n\n**Returns:** Converted number of sample frames, or -1 for errors/no input; call\nSDL_GetError() for details.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_AudioFramesToMS"]
310    pub fn MIX_AudioMSToFrames(audio: *mut MIX_Audio, ms: Sint64) -> Sint64;
311}
312unsafe extern "C" {
313    #[doc = "Convert sample frames for a MIX_Audio's format to milliseconds.\n\nThis calculates time based on the audio's initial format, even if the\nformat would change mid-stream.\n\nSample frames are more precise than milliseconds, so out of necessity, this\nfunction will approximate by rounding down to the closest full millisecond.\n\nIf `frames` is < 0, this returns -1.\n\n**Parameter:** audio the audio to query.\n\n**Parameter:** frames the audio-specific sample frames to convert to milliseconds.\n\n**Returns:** Converted number of milliseconds, or -1 for errors/no input; call\nSDL_GetError() for details.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_AudioMSToFrames"]
314    pub fn MIX_AudioFramesToMS(audio: *mut MIX_Audio, frames: Sint64) -> Sint64;
315}
316unsafe extern "C" {
317    #[doc = "Convert milliseconds to sample frames at a specific sample rate.\n\nIf `sample_rate` is <= 0, this returns -1. If `ms` is < 0, this returns -1.\n\n**Parameter:** sample_rate the sample rate to use for conversion.\n\n**Parameter:** ms the milliseconds to convert to rate-specific sample frames.\n\n**Returns:** Converted number of sample frames, or -1 for errors; call\nSDL_GetError() for details.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_FramesToMS"]
318    pub fn MIX_MSToFrames(sample_rate: core::ffi::c_int, ms: Sint64) -> Sint64;
319}
320unsafe extern "C" {
321    #[doc = "Convert sample frames, at a specific sample rate, to milliseconds.\n\nSample frames are more precise than milliseconds, so out of necessity, this\nfunction will approximate by rounding down to the closest full millisecond.\n\nIf `sample_rate` is <= 0, this returns -1. If `frames` is < 0, this returns\n-1.\n\n**Parameter:** sample_rate the sample rate to use for conversion.\n\n**Parameter:** frames the rate-specific sample frames to convert to milliseconds.\n\n**Returns:** Converted number of milliseconds, or -1 for errors; call\nSDL_GetError() for details.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_MSToFrames"]
322    pub fn MIX_FramesToMS(sample_rate: core::ffi::c_int, frames: Sint64) -> Sint64;
323}
324unsafe extern "C" {
325    #[doc = "Start (or restart) mixing a track for playback.\n\nThe track will use whatever input was last assigned to it when playing; an\ninput must be assigned to this track or this function will fail. Inputs are\nassigned with calls to MIX_SetTrackAudio(), MIX_SetTrackAudioStream(), or\nMIX_SetTrackIOStream().\n\nIf the track is already playing, or paused, this will restart the track\nwith the newly-specified parameters.\n\nAs there are several parameters, and more may be added in the future, they\nare specified with an SDL_PropertiesID. The parameters have reasonable\ndefaults, and specifying a 0 for `options` will choose defaults for\neverything.\n\nSDL_PropertiesID are discussed in\n[SDL's documentation](https://wiki.libsdl.org/SDL3/CategoryProperties)\n.\n\nThese are the supported properties:\n\n- `MIX_PROP_PLAY_LOOPS_NUMBER`: The number of times to loop the track when\nit reaches the end. A value of 1 will loop to the start one time. Zero\nwill not loop at all. A value of -1 requests infinite loops. If the input\nis not seekable and this value isn't zero, this function will report\nsuccess but the track will stop at the point it should loop. Default 0.\n- `MIX_PROP_PLAY_MAX_FRAME_NUMBER`: Mix at most to this sample frame\nposition in the track. This will be treated as if the input reach EOF at\nthis point in the audio file. If -1, mix all available audio without a\nlimit. Default -1.\n- `MIX_PROP_PLAY_MAX_MILLISECONDS_NUMBER`: The same as using the\nMIX_PROP_PLAY_MAX_FRAME_NUMBER property, but the value is specified in\nmilliseconds instead of sample frames. If both properties are specified,\nthe sample frames value is favored. Default -1.\n- `MIX_PROP_PLAY_START_FRAME_NUMBER`: Start mixing from this sample frame\nposition in the track's input. A value <= 0 will begin from the start of\n\nthe track's input. If the input is not seekable and this value is > 0,\nthis function will report failure. Default 0.\n- `MIX_PROP_PLAY_START_MILLISECOND_NUMBER`: The same as using the\nMIX_PROP_PLAY_START_FRAME_NUMBER property, but the value is specified in\nmilliseconds instead of sample frames. If both properties are specified,\nthe sample frames value is favored. Default 0.\n- `MIX_PROP_PLAY_LOOP_START_FRAME_NUMBER`: If the track is looping, this is\nthe sample frame position that the track will loop back to; this lets one\nplay an intro at the start of a track on the first iteration, but have a\nloop point somewhere in the middle thereafter. A value <= 0 will begin\nthe loop from the start of the track's input. Default 0.\n- `MIX_PROP_PLAY_LOOP_START_MILLISECOND_NUMBER`: The same as using the\nMIX_PROP_PLAY_LOOP_START_FRAME_NUMBER property, but the value is\nspecified in milliseconds instead of sample frames. If both properties\nare specified, the sample frames value is favored. Default 0.\n- `MIX_PROP_PLAY_FADE_IN_FRAMES_NUMBER`: The number of sample frames over\nwhich to fade in the newly-started track. The track will begin mixing\nsilence and reach full volume smoothly over this many sample frames. If\nthe track loops before the fade-in is complete, it will continue to fade\ncorrectly from the loop point. A value <= 0 will disable fade-in, so the\ntrack starts mixing at full volume. Default 0.\n- `MIX_PROP_PLAY_FADE_IN_MILLISECONDS_NUMBER`: The same as using the\nMIX_PROP_PLAY_FADE_IN_FRAMES_NUMBER property, but the value is specified\nin milliseconds instead of sample frames. If both properties are\nspecified, the sample frames value is favored. Default 0.\n- `MIX_PROP_PLAY_FADE_IN_START_GAIN_FLOAT`: If fading in, start fading from\nthis volume level. 0.0f is silence and 1.0f is full volume, every in\nbetween is a linear change in gain. The specified value will be clamped\nbetween 0.0f and 1.0f. Default 0.0f.\n- `MIX_PROP_PLAY_APPEND_SILENCE_FRAMES_NUMBER`: At the end of mixing this\ntrack, after all loops are complete, append this many sample frames of\nsilence as if it were part of the audio file. This allows for apps to\nimplement effects in callbacks, like reverb, that need to generate\nsamples past the end of the stream's audio, or perhaps introduce a delay\nbefore starting a new sound on the track without having to manage it\ndirectly. A value <= 0 generates no silence before stopping the track.\nDefault 0.\n- `MIX_PROP_PLAY_APPEND_SILENCE_MILLISECONDS_NUMBER`: The same as using the\nMIX_PROP_PLAY_APPEND_SILENCE_FRAMES_NUMBER property, but the value is\nspecified in milliseconds instead of sample frames. If both properties\nare specified, the sample frames value is favored. Default 0.\n- `MIX_PROP_PLAY_HALT_WHEN_EXHAUSTED_BOOLEAN`: If true, when input is\ncompletely consumed for the track, the mixer will mark the track as\nstopped (and call any appropriate MIX_TrackStoppedCallback, etc); to play\nmore, the track will need to be restarted. If false, the track will just\nnot contribute to the mix, but it will not be marked as stopped. There\nmay be clever logic tricks this exposes generally, but this property is\nspecifically useful when the track's input is an SDL_AudioStream assigned\nvia MIX_SetTrackAudioStream(). Setting this property to true can be\nuseful when pushing a complete piece of audio to the stream that has a\ndefinite ending, as the track will operate like any other audio was\napplied. Setting to false means as new data is added to the stream, the\nmixer will start using it as soon as possible, which is useful when audio\nshould play immediately as it drips in: new VoIP packets, etc. Note that\nin this situation, if the audio runs out when needed, there _will_ be\ngaps in the mixed output, so try to buffer enough data to avoid this when\npossible. Note that a track is not consider exhausted until all its loops\nand appended silence have been mixed (and also, that loops don't mean\nanything when the input is an AudioStream). Default true.\n- `MIX_PROP_PLAY_START_ORDER_NUMBER`: This is a special-case property that\nmost apps can ignore. For mod file formats, start mixing from a specific\n\"order\" index instead of the start of the file. A value < 0 will cause\nthis property to be ignored. If the decoder doesn't support this\nproperty, it will also be ignored. If this property is _not_ ignored, the\nMIX_PROP_PLAY_START_FRAME_NUMBER and\nMIX_PROP_PLAY_START_MILLISECOND_NUMBER properties will be ignored\ninstead. Default -1. Since SDL_mixer 3.2.2.\n\nIf this function fails, mixing of this track will not start (or restart, if\nit was already started).\n\n**Parameter:** track the track to start (or restart) mixing.\n\n**Parameter:** options a set of properties that control playback. May be zero.\n\n**Returns:** true on success, false on error; call SDL_GetError() for details.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_PlayTag\n\n**See Also:** MIX_PlayAudio\n\n**See Also:** MIX_StopTrack\n\n**See Also:** MIX_PauseTrack\n\n**See Also:** MIX_TrackPlaying"]
326    pub fn MIX_PlayTrack(track: *mut MIX_Track, options: SDL_PropertiesID) -> bool;
327}
328unsafe extern "C" {
329    #[doc = "Start (or restart) mixing all tracks with a specific tag for playback.\n\nThis function follows all the same rules as MIX_PlayTrack(); please refer\nto its documentation for the details. Unlike that function, MIX_PlayTag()\noperates on multiple tracks at once that have the specified tag applied,\nvia MIX_TagTrack().\n\nIf all of your tagged tracks have different sample rates, it would make\nsense to use the `*_MILLISECONDS_NUMBER` properties in your `options`,\ninstead of `*_FRAMES_NUMBER`, and let SDL_mixer figure out how to apply it\nto each track.\n\nThis function returns true if all tagged tracks are started (or restarted).\nIf any track fails, this function returns false, but all tracks that could\nstart will still be started even when this function reports failure.\n\nFrom the point of view of the mixing process, all tracks that successfully\n(re)start will do so at the exact same moment.\n\n**Parameter:** mixer the mixer on which to look for tagged tracks.\n\n**Parameter:** tag the tag to use when searching for tracks.\n\n**Parameter:** options the set of options that will be applied to each track.\n\n**Returns:** true on success, false on error; call SDL_GetError() for details.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_PlayTrack\n\n**See Also:** MIX_TagTrack\n\n**See Also:** MIX_StopTrack\n\n**See Also:** MIX_PauseTrack\n\n**See Also:** MIX_TrackPlaying"]
330    pub fn MIX_PlayTag(
331        mixer: *mut MIX_Mixer,
332        tag: *const core::ffi::c_char,
333        options: SDL_PropertiesID,
334    ) -> bool;
335}
336unsafe extern "C" {
337    #[doc = "Play a MIX_Audio from start to finish without any management.\n\nThis is what we term a \"fire-and-forget\" sound. Internally, SDL_mixer will\nmanage a temporary track to mix the specified MIX_Audio, cleaning it up\nwhen complete. No options can be provided for how to do the mixing, like\nMIX_PlayTrack() offers, and since the track is not available to the caller,\nno adjustments can be made to mixing over time.\n\nThis is not the function to build an entire game of any complexity around,\nbut it can be convenient to play simple, one-off sounds that can't be\nstopped early. An example would be a voice saying \"GAME OVER\" during an\nunpausable endgame sequence.\n\nThere are no limits to the number of fire-and-forget sounds that can mix at\nonce (short of running out of memory), and SDL_mixer keeps an internal pool\nof temporary tracks it creates as needed and reuses when available.\n\n**Parameter:** mixer the mixer on which to play this audio.\n\n**Parameter:** audio the audio input to play.\n\n**Returns:** true if the track has begun mixing, false on error; call\nSDL_GetError() for details.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_PlayTrack\n\n**See Also:** MIX_LoadAudio"]
338    pub fn MIX_PlayAudio(mixer: *mut MIX_Mixer, audio: *mut MIX_Audio) -> bool;
339}
340unsafe extern "C" {
341    #[doc = "Halt a currently-playing track, possibly fading out over time.\n\nIf `fade_out_frames` is > 0, the track does not stop mixing immediately,\nbut rather fades to silence over that many sample frames before stopping.\nSample frames are specific to the input assigned to the track, to allow for\nsample-perfect mixing. MIX_TrackMSToFrames() can be used to convert\nmilliseconds to an appropriate value here.\n\nIf the track ends normally while the fade-out is still in progress, the\naudio stops there; the fade is not adjusted to be shorter if it will last\nlonger than the audio remaining.\n\nOnce a track has completed any fadeout and come to a stop, it will call its\nMIX_TrackStoppedCallback, if any. It is legal to assign the track a new\ninput and/or restart it during this callback.\n\nIt is legal to halt a track that's already stopped. It does nothing, and\nreturns true.\n\n**Parameter:** track the track to halt.\n\n**Parameter:** fade_out_frames the number of sample frames to spend fading out to\nsilence before halting. 0 to stop immediately.\n\n**Returns:** true if the track has stopped, false on error; call SDL_GetError()\nfor details.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_PlayTrack"]
342    pub fn MIX_StopTrack(track: *mut MIX_Track, fade_out_frames: Sint64) -> bool;
343}
344unsafe extern "C" {
345    #[doc = "Halt all currently-playing tracks, possibly fading out over time.\n\nIf `fade_out_ms` is > 0, the tracks do not stop mixing immediately, but\nrather fades to silence over that many milliseconds before stopping. Note\nthat this is different than MIX_StopTrack(), which wants sample frames;\nthis function takes milliseconds because different tracks might have\ndifferent sample rates.\n\nIf a track ends normally while the fade-out is still in progress, the audio\nstops there; the fade is not adjusted to be shorter if it will last longer\nthan the audio remaining.\n\nOnce a track has completed any fadeout and come to a stop, it will call its\nMIX_TrackStoppedCallback, if any. It is legal to assign the track a new\ninput and/or restart it during this callback.\n\nThis function does not prevent new play requests from being made; it’s\nlegal to use this function to begin fading all playing tracks but then\nstart other tracks playing normally while those fade-outs are still in\nprogress.\n\n**Parameter:** mixer the mixer on which to stop all tracks.\n\n**Parameter:** fade_out_ms the number of milliseconds to spend fading out to\nsilence before halting. 0 to stop immediately.\n\n**Returns:** true on success, false on error; call SDL_GetError() for details.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_StopTrack"]
346    pub fn MIX_StopAllTracks(mixer: *mut MIX_Mixer, fade_out_ms: Sint64) -> bool;
347}
348unsafe extern "C" {
349    #[doc = "Halt all tracks with a specific tag, possibly fading out over time.\n\nIf `fade_out_ms` is > 0, the tracks do not stop mixing immediately, but\nrather fades to silence over that many milliseconds before stopping. Note\nthat this is different than MIX_StopTrack(), which wants sample frames;\nthis function takes milliseconds because different tracks might have\ndifferent sample rates.\n\nIf a track ends normally while the fade-out is still in progress, the audio\nstops there; the fade is not adjusted to be shorter if it will last longer\nthan the audio remaining.\n\nOnce a track has completed any fadeout and come to a stop, it will call its\nMIX_TrackStoppedCallback, if any. It is legal to assign the track a new\ninput and/or restart it during this callback. This function does not\nprevent new play requests from being made.\n\n**Parameter:** mixer the mixer on which to stop tracks.\n\n**Parameter:** tag the tag to use when searching for tracks.\n\n**Parameter:** fade_out_ms the number of milliseconds to spend fading out to\nsilence before halting. 0 to stop immediately.\n\n**Returns:** true on success, false on error; call SDL_GetError() for details.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_StopTrack\n\n**See Also:** MIX_TagTrack"]
350    pub fn MIX_StopTag(
351        mixer: *mut MIX_Mixer,
352        tag: *const core::ffi::c_char,
353        fade_out_ms: Sint64,
354    ) -> bool;
355}
356unsafe extern "C" {
357    #[doc = "Pause a currently-playing track.\n\nA paused track is not considered \"stopped,\" so its MIX_TrackStoppedCallback\nwill not fire if paused, but it won't change state by default, generate\naudio, or generally make progress, until it is resumed.\n\nIt is legal to pause a track that's in any state (playing, already paused,\nor stopped). Unless the track is currently playing, pausing does nothing,\nand returns true. A false return is only used to signal errors here (such\nas MIX_Init not being called or `track` being NULL).\n\n**Parameter:** track the track to pause.\n\n**Returns:** true if the track has paused, false on error; call SDL_GetError()\nfor details.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_ResumeTrack"]
358    pub fn MIX_PauseTrack(track: *mut MIX_Track) -> bool;
359}
360unsafe extern "C" {
361    #[doc = "Pause all currently-playing tracks.\n\nA paused track is not considered \"stopped,\" so its MIX_TrackStoppedCallback\nwill not fire if paused, but it won't change state by default, generate\naudio, or generally make progress, until it is resumed.\n\nThis function makes all tracks on the specified mixer that are currently\nplaying move to a paused state. They can later be resumed.\n\n**Parameter:** mixer the mixer on which to pause all tracks.\n\n**Returns:** true on success, false on error; call SDL_GetError() for details.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_ResumeTrack\n\n**See Also:** MIX_ResumeAllTracks"]
362    pub fn MIX_PauseAllTracks(mixer: *mut MIX_Mixer) -> bool;
363}
364unsafe extern "C" {
365    #[doc = "Pause all tracks with a specific tag.\n\nA paused track is not considered \"stopped,\" so its MIX_TrackStoppedCallback\nwill not fire if paused, but it won't change state by default, generate\naudio, or generally make progress, until it is resumed.\n\nThis function makes all currently-playing tracks on the specified mixer,\nwith a specific tag, move to a paused state. They can later be resumed.\n\nTracks that match the specified tag that aren't currently playing are\nignored.\n\n**Parameter:** mixer the mixer on which to pause tracks.\n\n**Parameter:** tag the tag to use when searching for tracks.\n\n**Returns:** true on success, false on error; call SDL_GetError() for details.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_PauseTrack\n\n**See Also:** MIX_ResumeTrack\n\n**See Also:** MIX_ResumeTag\n\n**See Also:** MIX_TagTrack"]
366    pub fn MIX_PauseTag(mixer: *mut MIX_Mixer, tag: *const core::ffi::c_char) -> bool;
367}
368unsafe extern "C" {
369    #[doc = "Resume a currently-paused track.\n\nA paused track is not considered \"stopped,\" so its MIX_TrackStoppedCallback\nwill not fire if paused, but it won't change state by default, generate\naudio, or generally make progress, until it is resumed.\n\nIt is legal to resume a track that's in any state (playing, paused, or\nstopped). Unless the track is currently paused, resuming does nothing, and\nreturns true. A false return is only used to signal errors here (such as\nMIX_Init not being called or `track` being NULL).\n\n**Parameter:** track the track to resume.\n\n**Returns:** true if the track has resumed, false on error; call SDL_GetError()\nfor details.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_PauseTrack"]
370    pub fn MIX_ResumeTrack(track: *mut MIX_Track) -> bool;
371}
372unsafe extern "C" {
373    #[doc = "Resume all currently-paused tracks.\n\nA paused track is not considered \"stopped,\" so its MIX_TrackStoppedCallback\nwill not fire if paused, but it won't change state by default, generate\naudio, or generally make progress, until it is resumed.\n\nThis function makes all tracks on the specified mixer that are currently\npaused move to a playing state.\n\n**Parameter:** mixer the mixer on which to resume all tracks.\n\n**Returns:** true on success, false on error; call SDL_GetError() for details.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_PauseTrack\n\n**See Also:** MIX_PauseAllTracks"]
374    pub fn MIX_ResumeAllTracks(mixer: *mut MIX_Mixer) -> bool;
375}
376unsafe extern "C" {
377    #[doc = "Resume all tracks with a specific tag.\n\nA paused track is not considered \"stopped,\" so its MIX_TrackStoppedCallback\nwill not fire if paused, but it won't change state by default, generate\naudio, or generally make progress, until it is resumed.\n\nThis function makes all currently-paused tracks on the specified mixer,\nwith a specific tag, move to a playing state.\n\nTracks that match the specified tag that aren't currently paused are\nignored.\n\n**Parameter:** mixer the mixer on which to resume tracks.\n\n**Parameter:** tag the tag to use when searching for tracks.\n\n**Returns:** true on success, false on error; call SDL_GetError() for details.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_ResumeTrack\n\n**See Also:** MIX_PauseTrack\n\n**See Also:** MIX_PauseTag\n\n**See Also:** MIX_TagTrack"]
378    pub fn MIX_ResumeTag(mixer: *mut MIX_Mixer, tag: *const core::ffi::c_char) -> bool;
379}
380unsafe extern "C" {
381    #[doc = "Query if a track is currently playing.\n\nIf this returns true, the track is currently contributing to the mixer's\noutput (it's \"playing\"). It is not stopped nor paused.\n\nOn various errors (MIX_Init() was not called, the track is NULL), this\nreturns false, but there is no mechanism to distinguish errors from\nnon-playing tracks.\n\n**Parameter:** track the track to query.\n\n**Returns:** true if playing, false otherwise.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_PlayTrack\n\n**See Also:** MIX_PauseTrack\n\n**See Also:** MIX_ResumeTrack\n\n**See Also:** MIX_StopTrack\n\n**See Also:** MIX_TrackPaused"]
382    pub fn MIX_TrackPlaying(track: *mut MIX_Track) -> bool;
383}
384unsafe extern "C" {
385    #[doc = "Query if a track is currently paused.\n\nIf this returns true, the track is not currently contributing to the\nmixer's output but will when resumed (it's \"paused\"). It is not playing nor\nstopped.\n\nOn various errors (MIX_Init() was not called, the track is NULL), this\nreturns false, but there is no mechanism to distinguish errors from\nnon-playing tracks.\n\n**Parameter:** track the track to query.\n\n**Returns:** true if paused, false otherwise.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_PlayTrack\n\n**See Also:** MIX_PauseTrack\n\n**See Also:** MIX_ResumeTrack\n\n**See Also:** MIX_StopTrack\n\n**See Also:** MIX_TrackPlaying"]
386    pub fn MIX_TrackPaused(track: *mut MIX_Track) -> bool;
387}
388unsafe extern "C" {
389    #[doc = "Set a mixer's master gain control.\n\nEach mixer has a master gain, to adjust the volume of the entire mix. Each\nsample passing through the pipeline is modulated by this gain value. A gain\nof zero will generate silence, 1.0f will not change the mixed volume, and\nlarger than 1.0f will increase the volume. Negative values are illegal.\nThere is no maximum gain specified, but this can quickly get extremely\nloud, so please be careful with this setting.\n\nA mixer's master gain defaults to 1.0f.\n\nThis value can be changed at any time to adjust the future mix.\n\n**Parameter:** mixer the mixer to adjust.\n\n**Parameter:** gain the new gain value.\n\n**Returns:** true on success or false on failure; call SDL_GetError() for more\ninformation.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_GetMixerGain\n\n**See Also:** MIX_SetTrackGain"]
390    pub fn MIX_SetMixerGain(mixer: *mut MIX_Mixer, gain: f32) -> bool;
391}
392unsafe extern "C" {
393    #[doc = "Get a mixer's master gain control.\n\nThis returns the last value set through MIX_SetMixerGain(), or 1.0f if no\nvalue has ever been explicitly set.\n\n**Parameter:** mixer the mixer to query.\n\n**Returns:** the mixer's current master gain.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_SetMixerGain\n\n**See Also:** MIX_GetTrackGain"]
394    pub fn MIX_GetMixerGain(mixer: *mut MIX_Mixer) -> f32;
395}
396unsafe extern "C" {
397    #[doc = "Set a track's gain control.\n\nEach track has its own gain, to adjust its overall volume. Each sample from\nthis track is modulated by this gain value. A gain of zero will generate\nsilence, 1.0f will not change the mixed volume, and larger than 1.0f will\nincrease the volume. Negative values are illegal. There is no maximum gain\nspecified, but this can quickly get extremely loud, so please be careful\nwith this setting.\n\nA track's gain defaults to 1.0f.\n\nThis value can be changed at any time to adjust the future mix.\n\n**Parameter:** track the track to adjust.\n\n**Parameter:** gain the new gain value.\n\n**Returns:** true on success or false on failure; call SDL_GetError() for more\ninformation.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_GetTrackGain\n\n**See Also:** MIX_SetMixerGain"]
398    pub fn MIX_SetTrackGain(track: *mut MIX_Track, gain: f32) -> bool;
399}
400unsafe extern "C" {
401    #[doc = "Get a track's gain control.\n\nThis returns the last value set through MIX_SetTrackGain(), or 1.0f if no\nvalue has ever been explicitly set.\n\n**Parameter:** track the track to query.\n\n**Returns:** the track's current gain.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_SetTrackGain\n\n**See Also:** MIX_GetMixerGain"]
402    pub fn MIX_GetTrackGain(track: *mut MIX_Track) -> f32;
403}
404unsafe extern "C" {
405    #[doc = "Set the gain control of all tracks with a specific tag.\n\nEach track has its own gain, to adjust its overall volume. Each sample from\nthis track is modulated by this gain value. A gain of zero will generate\nsilence, 1.0f will not change the mixed volume, and larger than 1.0f will\nincrease the volume. Negative values are illegal. There is no maximum gain\nspecified, but this can quickly get extremely loud, so please be careful\nwith this setting.\n\nA track's gain defaults to 1.0f.\n\nThis will change the gain control on tracks on the specified mixer that\nhave the specified tag.\n\nFrom the point of view of the mixing process, all tracks that successfully\nchange gain values will do so at the exact same moment.\n\nThis value can be changed at any time to adjust the future mix.\n\n**Parameter:** mixer the mixer on which to look for tagged tracks.\n\n**Parameter:** tag the tag to use when searching for tracks.\n\n**Parameter:** gain the new gain value.\n\n**Returns:** true on success or false on failure; call SDL_GetError() for more\ninformation.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_GetTrackGain\n\n**See Also:** MIX_SetTrackGain\n\n**See Also:** MIX_SetMixerGain\n\n**See Also:** MIX_TagTrack"]
406    pub fn MIX_SetTagGain(mixer: *mut MIX_Mixer, tag: *const core::ffi::c_char, gain: f32) -> bool;
407}
408unsafe extern "C" {
409    #[doc = "Set a mixer's master frequency ratio.\n\nEach mixer has a master frequency ratio, that affects the entire mix. This\ncan cause the final output to change speed and pitch. A value greater than\n1.0f will play the audio faster, and at a higher pitch. A value less than\n1.0f will play the audio slower, and at a lower pitch. 1.0f is normal\nspeed.\n\nEach track _also_ has a frequency ratio; it will be applied when mixing\nthat track's audio regardless of the master setting. The master setting\naffects the final output after all mixing has been completed.\n\nA mixer's master frequency ratio defaults to 1.0f.\n\nThis value can be changed at any time to adjust the future mix.\n\n**Parameter:** mixer the mixer to adjust.\n\n**Parameter:** ratio the frequency ratio. Must be between 0.01f and 100.0f.\n\n**Returns:** true on success or false on failure; call SDL_GetError() for more\ninformation.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_GetMixerFrequencyRatio\n\n**See Also:** MIX_SetTrackFrequencyRatio"]
410    pub fn MIX_SetMixerFrequencyRatio(mixer: *mut MIX_Mixer, ratio: f32) -> bool;
411}
412unsafe extern "C" {
413    #[doc = "Get a mixer's master frequency ratio.\n\nThis returns the last value set through MIX_SetMixerFrequencyRatio(), or\n1.0f if no value has ever been explicitly set.\n\n**Parameter:** mixer the mixer to query.\n\n**Returns:** the mixer's current master frequency ratio.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_SetMixerFrequencyRatio\n\n**See Also:** MIX_GetTrackFrequencyRatio"]
414    pub fn MIX_GetMixerFrequencyRatio(mixer: *mut MIX_Mixer) -> f32;
415}
416unsafe extern "C" {
417    #[doc = "Change the frequency ratio of a track.\n\nThe frequency ratio is used to adjust the rate at which audio data is\nconsumed. Changing this effectively modifies the speed and pitch of the\ntrack's audio. A value greater than 1.0f will play the audio faster, and at\na higher pitch. A value less than 1.0f will play the audio slower, and at a\nlower pitch. 1.0f is normal speed.\n\nThe default value is 1.0f.\n\nThis value can be changed at any time to adjust the future mix.\n\n**Parameter:** track the track on which to change the frequency ratio.\n\n**Parameter:** ratio the frequency ratio. Must be between 0.01f and 100.0f.\n\n**Returns:** true on success or false on failure; call SDL_GetError() for more\ninformation.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_GetTrackFrequencyRatio"]
418    pub fn MIX_SetTrackFrequencyRatio(track: *mut MIX_Track, ratio: f32) -> bool;
419}
420unsafe extern "C" {
421    #[doc = "Query the frequency ratio of a track.\n\nThe frequency ratio is used to adjust the rate at which audio data is\nconsumed. Changing this effectively modifies the speed and pitch of the\ntrack's audio. A value greater than 1.0f will play the audio faster, and at\na higher pitch. A value less than 1.0f will play the audio slower, and at a\nlower pitch. 1.0f is normal speed.\n\nThe default value is 1.0f.\n\nOn various errors (MIX_Init() was not called, the track is NULL), this\nreturns 0.0f. Since this is not a valid value to set, this can be seen as\nan error state.\n\n**Parameter:** track the track on which to query the frequency ratio.\n\n**Returns:** the current frequency ratio, or 0.0f on failure; call\nSDL_GetError() for more information.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_GetTrackFrequencyRatio"]
422    pub fn MIX_GetTrackFrequencyRatio(track: *mut MIX_Track) -> f32;
423}
424unsafe extern "C" {
425    #[doc = "Set the current output channel map of a track.\n\nChannel maps are optional; most things do not need them, instead passing\ndata in the order that SDL expects.\n\nThe output channel map reorders track data after transformations and before\nit is mixed into a mixer group. This can be useful for reversing stereo\nchannels, for example.\n\nEach item in the array represents an input channel, and its value is the\nchannel that it should be remapped to. To reverse a stereo signal's left\nand right values, you'd have an array of `{ 1, 0 }`. It is legal to remap\nmultiple channels to the same thing, so `{ 1, 1 }` would duplicate the\nright channel to both channels of a stereo signal. An element in the\nchannel map set to -1 instead of a valid channel will mute that channel,\nsetting it to a silence value.\n\nYou cannot change the number of channels through a channel map, just\nreorder/mute them.\n\nTracks default to no remapping applied. Passing a NULL channel map is\nlegal, and turns off remapping.\n\nSDL_mixer will copy the channel map; the caller does not have to save this\narray after this call.\n\n**Parameter:** track the track to change.\n\n**Parameter:** chmap the new channel map, NULL to reset to default.\n\n**Parameter:** count The number of channels in the map.\n\n**Returns:** true on success or false on failure; call SDL_GetError() for more\ninformation.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0."]
426    pub fn MIX_SetTrackOutputChannelMap(
427        track: *mut MIX_Track,
428        chmap: *const core::ffi::c_int,
429        count: core::ffi::c_int,
430    ) -> bool;
431}
432#[doc = "A set of per-channel gains for tracks using MIX_SetTrackStereo().\n\nWhen forcing a track to stereo, the app can specify a per-channel gain, to\nfurther adjust the left or right outputs.\n\nWhen mixing audio that has been forced to stereo, each channel is modulated\nby these values. A value of 1.0f produces no change, 0.0f produces silence.\n\nA simple panning effect would be to set `left` to the desired value and\n`right` to `1.0f - left`.\n\n**Available Since:** This struct is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_SetTrackStereo"]
433#[repr(C)]
434#[derive(Debug, Default, Copy, Clone)]
435pub struct MIX_StereoGains {
436    #[doc = "< left channel gain"]
437    pub left: f32,
438    #[doc = "< right channel gain"]
439    pub right: f32,
440}
441#[allow(clippy::unnecessary_operation, clippy::identity_op)]
442const _: () = {
443    ["Size of MIX_StereoGains"][::core::mem::size_of::<MIX_StereoGains>() - 8usize];
444    ["Alignment of MIX_StereoGains"][::core::mem::align_of::<MIX_StereoGains>() - 4usize];
445    ["Offset of field: MIX_StereoGains::left"]
446        [::core::mem::offset_of!(MIX_StereoGains, left) - 0usize];
447    ["Offset of field: MIX_StereoGains::right"]
448        [::core::mem::offset_of!(MIX_StereoGains, right) - 4usize];
449};
450unsafe extern "C" {
451    #[doc = "Force a track to stereo output, with optionally left/right panning.\n\nThis will cause the output of the track to convert to stereo, and then mix\nit only onto the Front Left and Front Right speakers, regardless of the\nspeaker configuration. The left and right channels are modulated by\n`gains`, which can be used to produce panning effects. This function may be\ncalled to adjust the gains at any time.\n\nIf `gains` is not NULL, this track will be switched into forced-stereo\nmode. If `gains` is NULL, this will disable spatialization (both the\nforced-stereo mode of this function and full 3D spatialization of\nMIX_SetTrack3DPosition()).\n\nNegative gains are clamped to zero; there is no clamp for maximum, so one\n\ncould set the value > 1.0f to make a channel louder.\n\nThe track's 3D position, reported by MIX_GetTrack3DPosition(), will be\nreset to (0, 0, 0).\n\n**Parameter:** track the track to adjust.\n\n**Parameter:** gains the per-channel gains, or NULL to disable spatialization.\n\n**Returns:** true on success or false on failure; call SDL_GetError() for more\ninformation.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_SetTrack3DPosition"]
452    pub fn MIX_SetTrackStereo(track: *mut MIX_Track, gains: *const MIX_StereoGains) -> bool;
453}
454#[doc = "3D coordinates for MIX_SetTrack3DPosition.\n\nThe coordinates use a \"right-handed\" coordinate system, like OpenGL and\nOpenAL.\n\n**Available Since:** This struct is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_SetTrack3DPosition"]
455#[repr(C)]
456#[derive(Debug, Default, Copy, Clone)]
457pub struct MIX_Point3D {
458    #[doc = "< X coordinate (negative left, positive right)."]
459    pub x: f32,
460    #[doc = "< Y coordinate (negative down, positive up)."]
461    pub y: f32,
462    #[doc = "< Z coordinate (negative forward, positive back)."]
463    pub z: f32,
464}
465#[allow(clippy::unnecessary_operation, clippy::identity_op)]
466const _: () = {
467    ["Size of MIX_Point3D"][::core::mem::size_of::<MIX_Point3D>() - 12usize];
468    ["Alignment of MIX_Point3D"][::core::mem::align_of::<MIX_Point3D>() - 4usize];
469    ["Offset of field: MIX_Point3D::x"][::core::mem::offset_of!(MIX_Point3D, x) - 0usize];
470    ["Offset of field: MIX_Point3D::y"][::core::mem::offset_of!(MIX_Point3D, y) - 4usize];
471    ["Offset of field: MIX_Point3D::z"][::core::mem::offset_of!(MIX_Point3D, z) - 8usize];
472};
473unsafe extern "C" {
474    #[doc = "Set a track's position in 3D space.\n\n(Please note that SDL_mixer is not intended to be a extremely powerful 3D\nAPI. It lacks 3D features that other APIs like OpenAL offer: there's no\ndoppler effect, distance models, rolloff, etc. This is meant to be Good\nEnough for games that can use some positional sounds and can even take\nadvantage of surround-sound configurations.)\n\nIf `position` is not NULL, this track will be switched into 3D positional\nmode. If `position` is NULL, this will disable positional mixing (both the\nfull 3D spatialization of this function and forced-stereo mode of\nMIX_SetTrackStereo()).\n\nIn 3D positional mode, SDL_mixer will mix this track as if it were\npositioned in 3D space, including distance attenuation (quieter as it gets\nfurther from the listener) and spatialization (positioned on the correct\nspeakers to suggest direction, either with stereo outputs or full surround\nsound).\n\nFor a mono speaker output, spatialization is effectively disabled but\ndistance attenuation will still work, which is all you can really do with a\nsingle speaker.\n\nThe coordinate system operates like OpenGL or OpenAL: a \"right-handed\"\ncoordinate system. See MIX_Point3D for the details.\n\nThe listener is always at coordinate (0,0,0) and can't be changed.\n\nThe track's input will be converted to mono (1 channel) so it can be\nrendered across the correct speakers.\n\n**Parameter:** track the track for which to set 3D position.\n\n**Parameter:** position the new 3D position for the track. May be NULL.\n\n**Returns:** true on success or false on failure; call SDL_GetError() for more\ninformation.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_GetTrack3DPosition\n\n**See Also:** MIX_SetTrackStereo"]
475    pub fn MIX_SetTrack3DPosition(track: *mut MIX_Track, position: *const MIX_Point3D) -> bool;
476}
477unsafe extern "C" {
478    #[doc = "Get a track's current position in 3D space.\n\nIf 3D positioning isn't enabled for this track, through a call to\nMIX_SetTrack3DPosition(), this will return (0,0,0).\n\n**Parameter:** track the track to query.\n\n**Parameter:** position on successful return, will contain the track's position.\n\n**Returns:** true on success or false on failure; call SDL_GetError() for more\ninformation.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_SetTrack3DPosition"]
479    pub fn MIX_GetTrack3DPosition(track: *mut MIX_Track, position: *mut MIX_Point3D) -> bool;
480}
481unsafe extern "C" {
482    #[doc = "Create a mixing group.\n\nTracks are assigned to a mixing group (or if unassigned, they live in a\nmixer's internal default group). All tracks in a group are mixed together\nand the app can access this mixed data before it is mixed with all other\ngroups to produce the final output.\n\nThis can be a useful feature, but is completely optional; apps can ignore\nmixing groups entirely and still have a full experience with SDL_mixer.\n\nAfter creating a group, assign tracks to it with MIX_SetTrackGroup(). Use\nMIX_SetGroupPostMixCallback() to access the group's mixed data.\n\nA mixing group can be destroyed with MIX_DestroyGroup() when no longer\nneeded. Destroying the mixer will also destroy all its still-existing\nmixing groups.\n\n**Parameter:** mixer the mixer on which to create a mixing group.\n\n**Returns:** a newly-created mixing group, or NULL on error; call\nSDL_GetError() for more information.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_DestroyGroup\n\n**See Also:** MIX_SetTrackGroup\n\n**See Also:** MIX_SetGroupPostMixCallback"]
483    pub fn MIX_CreateGroup(mixer: *mut MIX_Mixer) -> *mut MIX_Group;
484}
485unsafe extern "C" {
486    #[doc = "Destroy a mixing group.\n\nAny tracks currently assigned to this group will be reassigned to the\nmixer's internal default group.\n\n**Parameter:** group the mixing group to destroy.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_CreateGroup"]
487    pub fn MIX_DestroyGroup(group: *mut MIX_Group);
488}
489unsafe extern "C" {
490    #[doc = "Get the properties associated with a group.\n\nCurrently SDL_mixer assigns no properties of its own to a group, but this\ncan be a convenient place to store app-specific data.\n\nA SDL_PropertiesID is created the first time this function is called for a\ngiven group.\n\n**Parameter:** group the group to query.\n\n**Returns:** a valid property ID on success or 0 on failure; call\nSDL_GetError() for more information.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0."]
491    pub fn MIX_GetGroupProperties(group: *mut MIX_Group) -> SDL_PropertiesID;
492}
493unsafe extern "C" {
494    #[doc = "Get the MIX_Mixer that owns a MIX_Group.\n\nThis is the mixer pointer that was passed to MIX_CreateGroup().\n\n**Parameter:** group the group to query.\n\n**Returns:** the mixer associated with the group, or NULL on error; call\nSDL_GetError() for more information.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0."]
495    pub fn MIX_GetGroupMixer(group: *mut MIX_Group) -> *mut MIX_Mixer;
496}
497unsafe extern "C" {
498    #[doc = "Assign a track to a mixing group.\n\nAll tracks in a group are mixed together, and that output is made available\nto the app before it is mixed into the final output.\n\nTracks can only be in one group at a time, and the track and group must\nhave been created on the same MIX_Mixer.\n\nSetting a track to a NULL group will remove it from any app-created groups,\nand reassign it to the mixer's internal default group.\n\n**Parameter:** track the track to set mixing group assignment.\n\n**Parameter:** group the new mixing group to assign to. May be NULL.\n\n**Returns:** true on success or false on failure; call SDL_GetError() for more\ninformation.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_CreateGroup\n\n**See Also:** MIX_SetGroupPostMixCallback"]
499    pub fn MIX_SetTrackGroup(track: *mut MIX_Track, group: *mut MIX_Group) -> bool;
500}
501#[doc = "A callback that fires when a MIX_Track is stopped.\n\nThis callback is fired when a track completes playback, either because it\nran out of data to mix (and all loops were completed as well), or it was\nexplicitly stopped by the app. Pausing a track will not fire this callback.\n\nIt is legal to adjust the track, including changing its input and\nrestarting it. If this is done because it ran out of data in the middle of\nmixing, the mixer will start mixing the new track state in its current run\nwithout any gap in the audio.\n\nThis callback will not fire when a playing track is destroyed.\n\n**Parameter:** userdata an opaque pointer provided by the app for its personal use.\n\n**Parameter:** track the track that has stopped.\n\n**Available Since:** This datatype is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_SetTrackStoppedCallback"]
502pub type MIX_TrackStoppedCallback = ::core::option::Option<
503    unsafe extern "C" fn(userdata: *mut core::ffi::c_void, track: *mut MIX_Track),
504>;
505unsafe extern "C" {
506    #[doc = "Set a callback that fires when a MIX_Track is stopped.\n\nWhen a track completes playback, either because it ran out of data to mix\n(and all loops were completed as well), or it was explicitly stopped by the\napp, it will fire the callback specified here.\n\nEach track has its own unique callback.\n\nPassing a NULL callback here is legal; it disables this track's callback.\n\nPausing a track will not fire the callback, nor will the callback fire on a\nplaying track that is being destroyed.\n\nIt is legal to adjust the track, including changing its input and\nrestarting it. If this is done because it ran out of data in the middle of\nmixing, the mixer will start mixing the new track state in its current run\nwithout any gap in the audio.\n\n**Parameter:** track the track to assign this callback to.\n\n**Parameter:** cb the function to call when the track stops. May be NULL.\n\n**Parameter:** userdata an opaque pointer provided to the callback for its own\npersonal use.\n\n**Returns:** true on success or false on failure; call SDL_GetError() for more\ninformation.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_TrackStoppedCallback"]
507    pub fn MIX_SetTrackStoppedCallback(
508        track: *mut MIX_Track,
509        cb: MIX_TrackStoppedCallback,
510        userdata: *mut core::ffi::c_void,
511    ) -> bool;
512}
513#[doc = "A callback that fires when a MIX_Track is mixing at various stages.\n\nThis callback is fired for different parts of the mixing pipeline, and\ngives the app visbility into the audio data that is being generated at\nvarious stages.\n\nThe audio data passed through here is _not_ const data; the app is\npermitted to change it in any way it likes, and those changes will\npropagate through the mixing pipeline.\n\nAn audiospec is provided. Different tracks might be in different formats,\nand an app needs to be able to handle that, but SDL_mixer always does its\nmixing work in 32-bit float samples, even if the inputs or final output are\n\nnot floating point. As such, `spec->format` will always be `SDL_AUDIO_F32`\nand `pcm` hardcoded to be a float pointer.\n\n`samples` is the number of float values pointed to by `pcm`: samples, not\nsample frames! There are no promises how many samples will be provided\nper-callback, and this number can vary wildly from call to call, depending\non many factors.\n\nMaking changes to the track during this callback is undefined behavior.\nChange the data in `pcm` but not the track itself.\n\n**Parameter:** userdata an opaque pointer provided by the app for its personal use.\n\n**Parameter:** track the track that is being mixed.\n\n**Parameter:** spec the format of the data in `pcm`.\n\n**Parameter:** pcm the raw PCM data in float32 format.\n\n**Parameter:** samples the number of float values pointed to by `pcm`.\n\n**Available Since:** This datatype is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_SetTrackRawCallback\n\n**See Also:** MIX_SetTrackCookedCallback"]
514pub type MIX_TrackMixCallback = ::core::option::Option<
515    unsafe extern "C" fn(
516        userdata: *mut core::ffi::c_void,
517        track: *mut MIX_Track,
518        spec: *const SDL_AudioSpec,
519        pcm: *mut f32,
520        samples: core::ffi::c_int,
521    ),
522>;
523unsafe extern "C" {
524    #[doc = "Set a callback that fires when a MIX_Track has initial decoded audio.\n\nAs a track needs to mix more data, it pulls from its input (a MIX_Audio, an\nSDL_AudioStream, etc). This input might be a compressed file format, like\nMP3, so a little more data is uncompressed from it.\n\nOnce the track has PCM data to start operating on, it can fire a callback\nbefore _any_ changes to the raw PCM input have happened. This lets an app\nview the data before it has gone through transformations such as gain, 3D\npositioning, fading, etc. It can also change the data in any way it pleases\nduring this callback, and the mixer will continue as if this data came\ndirectly from the input.\n\nEach track has its own unique raw callback.\n\nPassing a NULL callback here is legal; it disables this track's callback.\n\n**Parameter:** track the track to assign this callback to.\n\n**Parameter:** cb the function to call when the track mixes. May be NULL.\n\n**Parameter:** userdata an opaque pointer provided to the callback for its own\npersonal use.\n\n**Returns:** true on success or false on failure; call SDL_GetError() for more\ninformation.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_TrackMixCallback\n\n**See Also:** MIX_SetTrackCookedCallback"]
525    pub fn MIX_SetTrackRawCallback(
526        track: *mut MIX_Track,
527        cb: MIX_TrackMixCallback,
528        userdata: *mut core::ffi::c_void,
529    ) -> bool;
530}
531unsafe extern "C" {
532    #[doc = "Set a callback that fires when the mixer has transformed a track's audio.\n\nAs a track needs to mix more data, it pulls from its input (a MIX_Audio, an\nSDL_AudioStream, etc). This input might be a compressed file format, like\nMP3, so a little more data is uncompressed from it.\n\nOnce the track has PCM data to start operating on, and its raw callback has\ncompleted, it will begin to transform the audio: gain, fading, frequency\nratio, 3D positioning, etc.\n\nA callback can be fired after all these transformations, but before the\ntransformed data is mixed into other tracks. This lets an app view the data\nat the last moment that it is still a part of this track. It can also\nchange the data in any way it pleases during this callback, and the mixer\nwill continue as if this data came directly from the input.\n\nEach track has its own unique cooked callback.\n\nPassing a NULL callback here is legal; it disables this track's callback.\n\n**Parameter:** track the track to assign this callback to.\n\n**Parameter:** cb the function to call when the track mixes. May be NULL.\n\n**Parameter:** userdata an opaque pointer provided to the callback for its own\npersonal use.\n\n**Returns:** true on success or false on failure; call SDL_GetError() for more\ninformation.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_TrackMixCallback\n\n**See Also:** MIX_SetTrackRawCallback"]
533    pub fn MIX_SetTrackCookedCallback(
534        track: *mut MIX_Track,
535        cb: MIX_TrackMixCallback,
536        userdata: *mut core::ffi::c_void,
537    ) -> bool;
538}
539#[doc = "A callback that fires when a MIX_Group has completed mixing.\n\nThis callback is fired when a mixing group has finished mixing: all tracks\nin the group have mixed into a single buffer and are prepared to be mixed\ninto all other groups for the final mix output.\n\nThe audio data passed through here is _not_ const data; the app is\npermitted to change it in any way it likes, and those changes will\npropagate through the mixing pipeline.\n\nAn audiospec is provided. Different groups might be in different formats,\nand an app needs to be able to handle that, but SDL_mixer always does its\nmixing work in 32-bit float samples, even if the inputs or final output are\n\nnot floating point. As such, `spec->format` will always be `SDL_AUDIO_F32`\nand `pcm` hardcoded to be a float pointer.\n\n`samples` is the number of float values pointed to by `pcm`: samples, not\nsample frames! There are no promises how many samples will be provided\nper-callback, and this number can vary wildly from call to call, depending\non many factors.\n\n**Parameter:** userdata an opaque pointer provided by the app for its personal use.\n\n**Parameter:** group the group that is being mixed.\n\n**Parameter:** spec the format of the data in `pcm`.\n\n**Parameter:** pcm the raw PCM data in float32 format.\n\n**Parameter:** samples the number of float values pointed to by `pcm`.\n\n**Available Since:** This datatype is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_SetGroupPostMixCallback"]
540pub type MIX_GroupMixCallback = ::core::option::Option<
541    unsafe extern "C" fn(
542        userdata: *mut core::ffi::c_void,
543        group: *mut MIX_Group,
544        spec: *const SDL_AudioSpec,
545        pcm: *mut f32,
546        samples: core::ffi::c_int,
547    ),
548>;
549unsafe extern "C" {
550    #[doc = "Set a callback that fires when a mixer group has completed mixing.\n\nAfter all playing tracks in a mixer group have pulled in more data from\ntheir inputs, transformed it, and mixed together into a single buffer, a\ncallback can be fired. This lets an app view the data at the last moment\nthat it is still a part of this group. It can also change the data in any\nway it pleases during this callback, and the mixer will continue as if this\ndata came directly from the group's mix buffer.\n\nEach group has its own unique callback. Tracks that aren't in an explicit\nMIX_Group are mixed in an internal grouping that is not available to the\napp.\n\nPassing a NULL callback here is legal; it disables this group's callback.\n\n**Parameter:** group the mixing group to assign this callback to.\n\n**Parameter:** cb the function to call when the group mixes. May be NULL.\n\n**Parameter:** userdata an opaque pointer provided to the callback for its own\npersonal use.\n\n**Returns:** true on success or false on failure; call SDL_GetError() for more\ninformation.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_GroupMixCallback"]
551    pub fn MIX_SetGroupPostMixCallback(
552        group: *mut MIX_Group,
553        cb: MIX_GroupMixCallback,
554        userdata: *mut core::ffi::c_void,
555    ) -> bool;
556}
557#[doc = "A callback that fires when all mixing has completed.\n\nThis callback is fired when the mixer has completed all its work. If this\nmixer was created with MIX_CreateMixerDevice(), the data provided by this\ncallback is what is being sent to the audio hardware, minus last\nconversions for format requirements. If this mixer was created with\nMIX_CreateMixer(), this is what is being output from MIX_Generate(), after\nfinal conversions.\n\nThe audio data passed through here is _not_ const data; the app is\npermitted to change it in any way it likes, and those changes will replace\nthe final mixer pipeline output.\n\nAn audiospec is provided. SDL_mixer always does its mixing work in 32-bit\nfloat samples, even if the inputs or final output are not floating point.\n\nAs such, `spec->format` will always be `SDL_AUDIO_F32` and `pcm` hardcoded\nto be a float pointer.\n\n`samples` is the number of float values pointed to by `pcm`: samples, not\nsample frames! There are no promises how many samples will be provided\nper-callback, and this number can vary wildly from call to call, depending\non many factors.\n\n**Parameter:** userdata an opaque pointer provided by the app for its personal use.\n\n**Parameter:** mixer the mixer that is generating audio.\n\n**Parameter:** spec the format of the data in `pcm`.\n\n**Parameter:** pcm the raw PCM data in float32 format.\n\n**Parameter:** samples the number of float values pointed to by `pcm`.\n\n**Available Since:** This datatype is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_SetPostMixCallback"]
558pub type MIX_PostMixCallback = ::core::option::Option<
559    unsafe extern "C" fn(
560        userdata: *mut core::ffi::c_void,
561        mixer: *mut MIX_Mixer,
562        spec: *const SDL_AudioSpec,
563        pcm: *mut f32,
564        samples: core::ffi::c_int,
565    ),
566>;
567unsafe extern "C" {
568    #[doc = "Set a callback that fires when all mixing has completed.\n\nAfter all mixer groups have processed, their buffers are mixed together\ninto a single buffer for the final output, at which point a callback can be\nfired. This lets an app view the data at the last moment before mixing\ncompletes. It can also change the data in any way it pleases during this\ncallback, and the mixer will continue as if this data is the final output.\n\nEach mixer has its own unique callback.\n\nPassing a NULL callback here is legal; it disables this mixer's callback.\n\n**Parameter:** mixer the mixer to assign this callback to.\n\n**Parameter:** cb the function to call when the mixer mixes. May be NULL.\n\n**Parameter:** userdata an opaque pointer provided to the callback for its own\npersonal use.\n\n**Returns:** true on success or false on failure; call SDL_GetError() for more\ninformation.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_PostMixCallback"]
569    pub fn MIX_SetPostMixCallback(
570        mixer: *mut MIX_Mixer,
571        cb: MIX_PostMixCallback,
572        userdata: *mut core::ffi::c_void,
573    ) -> bool;
574}
575unsafe extern "C" {
576    #[doc = "Generate mixer output when not driving an audio device.\n\nSDL_mixer allows the creation of MIX_Mixer objects that are not connected\nto an audio device, by calling MIX_CreateMixer() instead of\nMIX_CreateMixerDevice(). Such mixers will not generate output until\nexplicitly requested through this function.\n\nThe caller may request as much audio as desired, so long as `buflen` is a\nmultiple of the sample frame size specified when creating the mixer (for\nexample, if requesting stereo Sint16 audio, buflen must be a multiple of 4:\n2 bytes-per-channel times 2 channels).\n\nThe mixer will mix as quickly as possible; since it works in sample frames\ninstead of time, it can potentially generate enormous amounts of audio in a\nsmall amount of time.\n\nOn success, this always fills `buffer` with `buflen` bytes of audio; if all\nplaying tracks finish mixing, it will fill the remaining buffer with\nsilence.\n\nEach call to this function will pick up where it left off, playing tracks\nwill continue to mix from the point the previous call completed, etc. The\nmixer state can be changed between each call in any way desired: tracks can\nbe added, played, stopped, changed, removed, etc. Effectively this function\ndoes the same thing SDL_mixer does internally when the audio device needs\nmore audio to play.\n\nThis function can not be used with mixers from MIX_CreateMixerDevice();\nthose generate audio as needed internally.\n\nThis function returns the number of _bytes_ of real audio mixed, which\nmight be less than `buflen`. While all `buflen` bytes of `buffer` will be\ninitialized, if available tracks to mix run out, the end of the buffer will\nbe initialized with silence; this silence will not be counted in the return\nvalue, so the caller has the option to identify how much of the buffer has\n\nlegimitate contents vs appended silence. As such, any value >= 0 signifies\nsuccess. A return value of -1 means failure (out of memory, invalid\nparameters, etc).\n\n**Parameter:** mixer the mixer for which to generate more audio.\n\n**Parameter:** buffer a pointer to a buffer to store audio in.\n\n**Parameter:** buflen the number of bytes to store in buffer.\n\n**Returns:** The number of bytes of mixed audio, discounting appended silence,\non success, or -1 on failure; call SDL_GetError() for more\ninformation.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_CreateMixer"]
577    pub fn MIX_Generate(
578        mixer: *mut MIX_Mixer,
579        buffer: *mut core::ffi::c_void,
580        buflen: core::ffi::c_int,
581    ) -> core::ffi::c_int;
582}
583#[repr(C)]
584#[derive(Debug, Copy, Clone)]
585pub struct MIX_AudioDecoder {
586    _unused: [u8; 0],
587}
588unsafe extern "C" {
589    #[doc = "Create a MIX_AudioDecoder from a path on the filesystem.\n\nMost apps won't need this, as SDL_mixer's usual interfaces will decode\naudio as needed. However, if one wants to decode an audio file into a\nmemory buffer without playing it, this interface offers that.\n\nThis function allows properties to be specified. This is intended to supply\nfile-specific settings, such as where to find SoundFonts for a MIDI file,\netc. In most cases, the caller should pass a zero to specify no extra\nproperties.\n\nSDL_PropertiesID are discussed in\n[SDL's documentation](https://wiki.libsdl.org/SDL3/CategoryProperties)\n.\n\nWhen done with the audio decoder, it can be destroyed with\nMIX_DestroyAudioDecoder().\n\nThis function requires SDL_mixer to have been initialized with a successful\ncall to MIX_Init(), but does not need an actual MIX_Mixer to have been\ncreated.\n\n**Parameter:** path the path on the filesystem from which to load data.\n\n**Parameter:** props decoder-specific properties. May be zero.\n\n**Returns:** an audio decoder, ready to decode.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_CreateAudioDecoder_IO\n\n**See Also:** MIX_DecodeAudio\n\n**See Also:** MIX_DestroyAudioDecoder"]
590    pub fn MIX_CreateAudioDecoder(
591        path: *const core::ffi::c_char,
592        props: SDL_PropertiesID,
593    ) -> *mut MIX_AudioDecoder;
594}
595unsafe extern "C" {
596    #[doc = "Create a MIX_AudioDecoder from an SDL_IOStream.\n\nMost apps won't need this, as SDL_mixer's usual interfaces will decode\naudio as needed. However, if one wants to decode an audio file into a\nmemory buffer without playing it, this interface offers that.\n\nThis function allows properties to be specified. This is intended to supply\nfile-specific settings, such as where to find SoundFonts for a MIDI file,\netc. In most cases, the caller should pass a zero to specify no extra\nproperties.\n\nIf `closeio` is true, then `io` will be closed when this decoder is done\nwith it. If this function fails and `closeio` is true, then `io` will be\nclosed before this function returns.\n\nWhen done with the audio decoder, it can be destroyed with\nMIX_DestroyAudioDecoder().\n\nThis function requires SDL_mixer to have been initialized with a successful\ncall to MIX_Init(), but does not need an actual MIX_Mixer to have been\ncreated.\n\n**Parameter:** io the i/o stream from which to load data.\n\n**Parameter:** closeio if true, close the i/o stream when done with it.\n\n**Parameter:** props decoder-specific properties. May be zero.\n\n**Returns:** an audio decoder, ready to decode.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_CreateAudioDecoder_IO\n\n**See Also:** MIX_DecodeAudio\n\n**See Also:** MIX_DestroyAudioDecoder"]
597    pub fn MIX_CreateAudioDecoder_IO(
598        io: *mut SDL_IOStream,
599        closeio: bool,
600        props: SDL_PropertiesID,
601    ) -> *mut MIX_AudioDecoder;
602}
603unsafe extern "C" {
604    #[doc = "Destroy the specified audio decoder.\n\nDestroying a NULL MIX_AudioDecoder is a legal no-op.\n\n**Parameter:** audiodecoder the audio to destroy.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0."]
605    pub fn MIX_DestroyAudioDecoder(audiodecoder: *mut MIX_AudioDecoder);
606}
607unsafe extern "C" {
608    #[doc = "Get the properties associated with a MIX_AudioDecoder.\n\nSDL_mixer offers some properties of its own, but this can also be a\nconvenient place to store app-specific data.\n\nA SDL_PropertiesID is created the first time this function is called for a\ngiven MIX_AudioDecoder, if necessary.\n\nThe file-specific metadata exposed through this function is identical to\nthose available through MIX_GetAudioProperties(). Please refer to that\nfunction's documentation for details.\n\n**Parameter:** audiodecoder the audio decoder to query.\n\n**Returns:** a valid property ID on success or 0 on failure; call\nSDL_GetError() for more information.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0.\n\n**See Also:** MIX_GetAudioProperties"]
609    pub fn MIX_GetAudioDecoderProperties(audiodecoder: *mut MIX_AudioDecoder) -> SDL_PropertiesID;
610}
611unsafe extern "C" {
612    #[doc = "Query the initial audio format of a MIX_AudioDecoder.\n\nNote that some audio files can change format in the middle; some explicitly\nsupport this, but a more common example is two MP3 files concatenated\ntogether. In many cases, SDL_mixer will correctly handle these sort of\nfiles, but this function will only report the initial format a file uses.\n\n**Parameter:** audiodecoder the audio decoder to query.\n\n**Parameter:** spec on success, audio format details will be stored here.\n\n**Returns:** true on success or false on failure; call SDL_GetError() for more\ninformation.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0."]
613    pub fn MIX_GetAudioDecoderFormat(
614        audiodecoder: *mut MIX_AudioDecoder,
615        spec: *mut SDL_AudioSpec,
616    ) -> bool;
617}
618unsafe extern "C" {
619    #[doc = "Decode more audio from a MIX_AudioDecoder.\n\nData is decoded on demand in whatever format is requested. The format is\npermitted to change between calls.\n\nThis function will return the number of bytes decoded, which may be less\nthan requested if there was an error or end-of-file. A return value of zero\nmeans the entire file was decoded, -1 means an unrecoverable error\nhappened.\n\n**Parameter:** audiodecoder the decoder from which to retrieve more data.\n\n**Parameter:** buffer the memory buffer to store decoded audio.\n\n**Parameter:** buflen the maximum number of bytes to store to `buffer`.\n\n**Parameter:** spec the format that audio data will be stored to `buffer`.\n\n**Returns:** number of bytes decoded, or -1 on error; call SDL_GetError() for\nmore information.\n\n**Thread Safety:** It is safe to call this function from any thread.\n\n**Available Since:** This function is available since SDL_mixer 3.0.0."]
620    pub fn MIX_DecodeAudio(
621        audiodecoder: *mut MIX_AudioDecoder,
622        buffer: *mut core::ffi::c_void,
623        buflen: core::ffi::c_int,
624        spec: *const SDL_AudioSpec,
625    ) -> core::ffi::c_int;
626}