1601 lines
129 KiB
HTML
1601 lines
129 KiB
HTML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<!-- This file is generated by Nim. -->
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<!-- Favicon -->
|
|
<link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAUAAAAF////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAIAAABbAAAAlQAAAKIAAACbAAAAmwAAAKIAAACVAAAAWwAAAAL///8A////AP///wD///8A////AAAAABQAAADAAAAAYwAAAA3///8A////AP///wD///8AAAAADQAAAGMAAADAAAAAFP///wD///8A////AP///wAAAACdAAAAOv///wD///8A////AP///wD///8A////AP///wD///8AAAAAOgAAAJ3///8A////AP///wAAAAAnAAAAcP///wAAAAAoAAAASv///wD///8A////AP///wAAAABKAAAAKP///wAAAABwAAAAJ////wD///8AAAAAgQAAABwAAACIAAAAkAAAAJMAAACtAAAAFQAAABUAAACtAAAAkwAAAJAAAACIAAAAHAAAAIH///8A////AAAAAKQAAACrAAAAaP///wD///8AAAAARQAAANIAAADSAAAARf///wD///8AAAAAaAAAAKsAAACk////AAAAADMAAACcAAAAnQAAABj///8A////AP///wAAAAAYAAAAGP///wD///8A////AAAAABgAAACdAAAAnAAAADMAAAB1AAAAwwAAAP8AAADpAAAAsQAAAE4AAAAb////AP///wAAAAAbAAAATgAAALEAAADpAAAA/wAAAMMAAAB1AAAAtwAAAOkAAAD/AAAA/wAAAP8AAADvAAAA3gAAAN4AAADeAAAA3gAAAO8AAAD/AAAA/wAAAP8AAADpAAAAtwAAAGUAAAA/AAAA3wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADfAAAAPwAAAGX///8A////AAAAAEgAAADtAAAAvwAAAL0AAADGAAAA7wAAAO8AAADGAAAAvQAAAL8AAADtAAAASP///wD///8A////AP///wD///8AAAAAO////wD///8A////AAAAAIcAAACH////AP///wD///8AAAAAO////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AAD4HwAA7/cAAN/7AAD//wAAoYUAAJ55AACf+QAAh+EAAAAAAADAAwAA4AcAAP5/AAD//wAA//8AAA=="/>
|
|
<link rel="icon" type="image/png" sizes="32x32" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4QQQEwksSS9ZWwAAAk1JREFUWMPtll2ITVEUx39nn/O7Y5qR8f05wtCUUr6ZIS++8pEnkZInPImneaCQ5METNdOkeFBKUhMPRIkHKfEuUZSUlGlKPN2TrgfncpvmnntnmlEyq1Z7t89/rf9a6+y99oZxGZf/XeIq61EdtgKXgdXA0xrYAvBjOIF1AI9zvjcC74BSpndrJPkBWDScTF8Aa4E3wDlgHbASaANmVqlcCnwHvgDvgVfAJ+AikAAvgfVZwLnSVZHZaOuKoQi3ZOMi4NkYkpe1p4J7A8BpYAD49hfIy/oqG0+hLomiKP2L5L+1ubn5115S+3OAn4EnwBlgMzCjyt6ZAnQCJ4A7wOs88iRJHvw50HoujuPBoCKwHWiosy8MdfZnAdcHk8dxXFJ3VQbQlCTJvRBCGdRbD4M6uc5glpY3eAihpN5S5w12diSEcCCEcKUO4ljdr15T76ur1FDDLIQQ3qv71EdDOe3Kxj3leRXyk+pxdWnFWod6Wt2bY3de3aSuUHcPBVimHs7mK9WrmeOF6lR1o9qnzskh2ar2qm1qizpfXaPeVGdlmGN5pb09qMxz1Xb1kLqgzn1RyH7JUXW52lr5e/Kqi9qpto7V1atuUzfnARrV7jEib1T76gG2qxdGmXyiekkt1GswPTtek0aBfJp6YySGBfWg2tPQ0FAYgf1stUfdmdcjarbYJEniKIq6gY/Aw+zWHAC+p2labGpqiorFYgGYCEzN7oQdQClN07O1/EfDyGgC0ALMBdYAi4FyK+4H3gLPsxfR1zRNi+NP7nH5J+QntnXe5B5mpfQAAAAASUVORK5CYII=">
|
|
|
|
<!-- Google fonts -->
|
|
<link href='https://fonts.googleapis.com/css?family=Lato:400,600,900' rel='stylesheet' type='text/css'/>
|
|
<link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/>
|
|
|
|
<!-- CSS -->
|
|
<title>sdl2/sdl2_mixer</title>
|
|
<link rel="stylesheet" type="text/css" href="../nimdoc.out.css">
|
|
|
|
<script type="text/javascript" src="dochack.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
function main() {
|
|
var pragmaDots = document.getElementsByClassName("pragmadots");
|
|
for (var i = 0; i < pragmaDots.length; i++) {
|
|
pragmaDots[i].onclick = function(event) {
|
|
// Hide tease
|
|
event.target.parentNode.style.display = "none";
|
|
// Show actual
|
|
event.target.parentNode.nextElementSibling.style.display = "inline";
|
|
}
|
|
}
|
|
|
|
const toggleSwitch = document.querySelector('.theme-switch input[type="checkbox"]');
|
|
function switchTheme(e) {
|
|
if (e.target.checked) {
|
|
document.documentElement.setAttribute('data-theme', 'dark');
|
|
localStorage.setItem('theme', 'dark');
|
|
} else {
|
|
document.documentElement.setAttribute('data-theme', 'light');
|
|
localStorage.setItem('theme', 'light');
|
|
}
|
|
}
|
|
|
|
toggleSwitch.addEventListener('change', switchTheme, false);
|
|
|
|
|
|
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
|
document.documentElement.setAttribute('data-theme', "dark");
|
|
toggleSwitch.checked = true;
|
|
} else if (window.matchMedia && window.matchMedia('(prefers-color-scheme: light)').matches) {
|
|
document.documentElement.setAttribute('data-theme', "light");
|
|
toggleSwitch.checked = false;
|
|
} else {
|
|
const currentTheme = localStorage.getItem('theme') ? localStorage.getItem('theme') : null;
|
|
if (currentTheme) {
|
|
document.documentElement.setAttribute('data-theme', currentTheme);
|
|
|
|
if (currentTheme === 'dark') {
|
|
toggleSwitch.checked = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
</head>
|
|
<body onload="main()">
|
|
<div class="document" id="documentId">
|
|
<div class="container">
|
|
<h1 class="title">sdl2/sdl2_mixer</h1>
|
|
<div class="row">
|
|
<div class="three columns">
|
|
<div class="theme-switch-wrapper">
|
|
<label class="theme-switch" for="checkbox">
|
|
<input type="checkbox" id="checkbox" />
|
|
<div class="slider round"></div>
|
|
</label>
|
|
<em>Dark Mode</em>
|
|
</div>
|
|
<div id="global-links">
|
|
<ul class="simple">
|
|
</ul>
|
|
</div>
|
|
<div id="searchInputDiv">
|
|
Search: <input type="text" id="searchInput"
|
|
onkeyup="search()" />
|
|
</div>
|
|
<div>
|
|
Group by:
|
|
<select onchange="groupBy(this.value)">
|
|
<option value="section">Section</option>
|
|
<option value="type">Type</option>
|
|
</select>
|
|
</div>
|
|
<ul class="simple simple-toc" id="toc-list">
|
|
<li>
|
|
<a class="reference reference-toplevel" href="#6" id="56">Imports</a>
|
|
<ul class="simple simple-toc-section">
|
|
|
|
</ul>
|
|
</li>
|
|
<li>
|
|
<a class="reference reference-toplevel" href="#7" id="57">Types</a>
|
|
<ul class="simple simple-toc-section">
|
|
<li><a class="reference" href="#MIX_InitFlags"
|
|
title="MIX_InitFlags = distinct cint"><wbr />MIX_<wbr />Init<wbr />Flags<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#Fading"
|
|
title="Fading = distinct cint"><wbr />Fading<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#MusicType"
|
|
title="MusicType = distinct cint"><wbr />Music<wbr />Type<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#Chunk"
|
|
title="Chunk {.bycopy.} = object
|
|
allocated*: cint
|
|
abuf*: ptr Uint8
|
|
alen*: Uint32
|
|
volume*: Uint8 ## ::
|
|
## Per-sample volume, 0-128"><wbr />Chunk<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#Music"
|
|
title="Music {.incompleteStruct.} = object"><wbr />Music<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#EffectFunc_t"
|
|
title="EffectFunc_t = proc (chan: cint; stream: pointer; len: cint; udata: pointer) {.cdecl.}"><wbr />Effect<wbr />Func_<wbr />t<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#EffectDone_t"
|
|
title="EffectDone_t = proc (chan: cint; udata: pointer) {.cdecl.}"><wbr />Effect<wbr />Done_<wbr />t<span class="attachedType"></span></a></li>
|
|
|
|
</ul>
|
|
</li>
|
|
<li>
|
|
<a class="reference reference-toplevel" href="#10" id="60">Consts</a>
|
|
<ul class="simple simple-toc-section">
|
|
<li><a class="reference" href="#SDLmixerStd"
|
|
title="SDLmixerStd = false"><wbr />SDLmixer<wbr />Std<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#SDLmixerGit"
|
|
title="SDLmixerGit = false"><wbr />SDLmixer<wbr />Git<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#SDLmixerDL"
|
|
title="SDLmixerDL = true"><wbr />SDLmixer<wbr />DL<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#SDLmixerStatic"
|
|
title="SDLmixerStatic = true"><wbr />SDLmixer<wbr />Static<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#SDLmixerSetVer"
|
|
title="SDLmixerSetVer = """><wbr />SDLmixer<wbr />Set<wbr />Ver<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#SDLmixerLPath"
|
|
title="SDLmixerLPath = "/Users/joey/Projects/nim-sdl2/src/build/sdl2_mixer/build/.libs/libSDL2_mixer.a""><wbr />SDLmixer<wbr />LPath<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#SDLmixerPath"
|
|
title="SDLmixerPath = "/Users/joey/Projects/nim-sdl2/src/build/sdl2_mixer/SDL_mixer.h""><wbr />SDLmixer<wbr />Path<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#SetError"
|
|
title="SetError = """><wbr />Set<wbr />Error<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#GetError"
|
|
title="GetError = """><wbr />Get<wbr />Error<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#ClearError"
|
|
title="ClearError = """><wbr />Clear<wbr />Error<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#MIXER_MAJOR_VERSION"
|
|
title="MIXER_MAJOR_VERSION = 2"><wbr />MIXER_<wbr />MAJOR_<wbr />VERSION<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#MIXER_MINOR_VERSION"
|
|
title="MIXER_MINOR_VERSION = 0"><wbr />MIXER_<wbr />MINOR_<wbr />VERSION<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#MIXER_PATCHLEVEL"
|
|
title="MIXER_PATCHLEVEL = 4"><wbr />MIXER_<wbr />PATCHLEVEL<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#MIX_MAJOR_VERSION"
|
|
title="MIX_MAJOR_VERSION = 2"><wbr />MIX_<wbr />MAJOR_<wbr />VERSION<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#MIX_MINOR_VERSION"
|
|
title="MIX_MINOR_VERSION = 0"><wbr />MIX_<wbr />MINOR_<wbr />VERSION<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#MIX_PATCHLEVEL"
|
|
title="MIX_PATCHLEVEL = 4"><wbr />MIX_<wbr />PATCHLEVEL<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#MIX_INIT_FLAC"
|
|
title="MIX_INIT_FLAC = 1'i32"><wbr />MIX_<wbr />INIT_<wbr />FLAC<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#MIX_INIT_MOD"
|
|
title="MIX_INIT_MOD = 2'i32"><wbr />MIX_<wbr />INIT_<wbr />MOD<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#MIX_INIT_MP3"
|
|
title="MIX_INIT_MP3 = 8'i32"><wbr />MIX_<wbr />INIT_<wbr />MP3<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#MIX_INIT_OGG"
|
|
title="MIX_INIT_OGG = 16'i32"><wbr />MIX_<wbr />INIT_<wbr />OGG<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#MIX_INIT_MID"
|
|
title="MIX_INIT_MID = 32'i32"><wbr />MIX_<wbr />INIT_<wbr />MID<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#MIX_INIT_OPUS"
|
|
title="MIX_INIT_OPUS = 64'i32"><wbr />MIX_<wbr />INIT_<wbr />OPUS<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#MIX_CHANNELS"
|
|
title="MIX_CHANNELS = 8"><wbr />MIX_<wbr />CHANNELS<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#MIX_DEFAULT_FREQUENCY"
|
|
title="MIX_DEFAULT_FREQUENCY = 22050"><wbr />MIX_<wbr />DEFAULT_<wbr />FREQUENCY<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#MIX_DEFAULT_CHANNELS"
|
|
title="MIX_DEFAULT_CHANNELS = 2"><wbr />MIX_<wbr />DEFAULT_<wbr />CHANNELS<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#MIX_NO_FADING"
|
|
title="MIX_NO_FADING = 0'i32"><wbr />MIX_<wbr />NO_<wbr />FADING<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#MIX_FADING_OUT"
|
|
title="MIX_FADING_OUT = 1"><wbr />MIX_<wbr />FADING_<wbr />OUT<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#MIX_FADING_IN"
|
|
title="MIX_FADING_IN = 2"><wbr />MIX_<wbr />FADING_<wbr />IN<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#MUS_NONE"
|
|
title="MUS_NONE = 0'i32"><wbr />MUS_<wbr />NONE<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#MUS_CMD"
|
|
title="MUS_CMD = 1"><wbr />MUS_<wbr />CMD<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#MUS_WAV"
|
|
title="MUS_WAV = 2"><wbr />MUS_<wbr />WAV<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#MUS_MOD"
|
|
title="MUS_MOD = 3"><wbr />MUS_<wbr />MOD<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#MUS_MID"
|
|
title="MUS_MID = 4"><wbr />MUS_<wbr />MID<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#MUS_OGG"
|
|
title="MUS_OGG = 5"><wbr />MUS_<wbr />OGG<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#MUS_MP3"
|
|
title="MUS_MP3 = 6"><wbr />MUS_<wbr />MP3<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#MUS_MP3_MAD_UNUSED"
|
|
title="MUS_MP3_MAD_UNUSED = 7"><wbr />MUS_<wbr />MP3_<wbr />MAD_<wbr />UNUSED<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#MUS_FLAC"
|
|
title="MUS_FLAC = 8"><wbr />MUS_<wbr />FLAC<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#MUS_MODPLUG_UNUSED"
|
|
title="MUS_MODPLUG_UNUSED = 9"><wbr />MUS_<wbr />MODPLUG_<wbr />UNUSED<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#MUS_OPUS"
|
|
title="MUS_OPUS = 10"><wbr />MUS_<wbr />OPUS<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#MIX_CHANNEL_POST"
|
|
title="MIX_CHANNEL_POST = -2"><wbr />MIX_<wbr />CHANNEL_<wbr />POST<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#MIX_EFFECTSMAXSPEED"
|
|
title="MIX_EFFECTSMAXSPEED = "MIX_EFFECTSMAXSPEED""><wbr />MIX_<wbr />EFFECTSMAXSPEED<span class="attachedType"></span></a></li>
|
|
|
|
</ul>
|
|
</li>
|
|
<li>
|
|
<a class="reference reference-toplevel" href="#12" id="62">Procs</a>
|
|
<ul class="simple simple-toc-section">
|
|
<li><a class="reference" href="#linked_Version"
|
|
title="linked_Version(): ptr Version"><wbr />linked_<wbr />Version<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#init%2Ccint"
|
|
title="init(flags: cint): cint"><wbr />init<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#quit"
|
|
title="quit()"><wbr />quit<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#openAudio%2Ccint%2CUint16%2Ccint%2Ccint"
|
|
title="openAudio(frequency: cint; format: Uint16; channels: cint; chunksize: cint): cint"><wbr />open<wbr />Audio<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#openAudioDevice%2Ccint%2CUint16%2Ccint%2Ccint%2Ccstring%2Ccint"
|
|
title="openAudioDevice(frequency: cint; format: Uint16; channels: cint; chunksize: cint;
|
|
device: cstring; allowedChanges: cint): cint"><wbr />open<wbr />Audio<wbr />Device<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#allocateChannels%2Ccint"
|
|
title="allocateChannels(numchans: cint): cint"><wbr />allocate<wbr />Channels<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#querySpec%2Cptr.cint%2Cptr.Uint16%2Cptr.cint"
|
|
title="querySpec(frequency: ptr cint; format: ptr Uint16; channels: ptr cint): cint"><wbr />query<wbr />Spec<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#loadWAV_RW%2Cptr.RWops%2Ccint"
|
|
title="loadWAV_RW(src: ptr RWops; freesrc: cint): ptr Chunk"><wbr />load<wbr />WAV_<wbr />RW<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#loadMUS%2Ccstring"
|
|
title="loadMUS(file: cstring): ptr Music"><wbr />load<wbr />MUS<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#loadMUS_RW%2Cptr.RWops%2Ccint"
|
|
title="loadMUS_RW(src: ptr RWops; freesrc: cint): ptr Music"><wbr />load<wbr />MUS_<wbr />RW<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#loadMUSType_RW%2Cptr.RWops%2CMusicType%2Ccint"
|
|
title="loadMUSType_RW(src: ptr RWops; kind: MusicType; freesrc: cint): ptr Music"><wbr />load<wbr />MUSType_<wbr />RW<span class="attachedType">MusicType</span></a></li>
|
|
<li><a class="reference" href="#quickLoad_WAV%2Cptr.Uint8"
|
|
title="quickLoad_WAV(mem: ptr Uint8): ptr Chunk"><wbr />quick<wbr />Load_<wbr />WAV<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#quickLoad_RAW%2Cptr.Uint8%2CUint32"
|
|
title="quickLoad_RAW(mem: ptr Uint8; len: Uint32): ptr Chunk"><wbr />quick<wbr />Load_<wbr />RAW<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#freeChunk%2Cptr.Chunk"
|
|
title="freeChunk(chunk: ptr Chunk)"><wbr />free<wbr />Chunk<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#freeMusic%2Cptr.Music"
|
|
title="freeMusic(music: ptr Music)"><wbr />free<wbr />Music<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#getNumChunkDecoders"
|
|
title="getNumChunkDecoders(): cint"><wbr />get<wbr />Num<wbr />Chunk<wbr />Decoders<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#getChunkDecoder%2Ccint"
|
|
title="getChunkDecoder(index: cint): cstring"><wbr />get<wbr />Chunk<wbr />Decoder<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#hasChunkDecoder%2Ccstring"
|
|
title="hasChunkDecoder(name: cstring): bool"><wbr />has<wbr />Chunk<wbr />Decoder<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#getNumMusicDecoders"
|
|
title="getNumMusicDecoders(): cint"><wbr />get<wbr />Num<wbr />Music<wbr />Decoders<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#getMusicDecoder%2Ccint"
|
|
title="getMusicDecoder(index: cint): cstring"><wbr />get<wbr />Music<wbr />Decoder<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#hasMusicDecoder%2Ccstring"
|
|
title="hasMusicDecoder(name: cstring): bool"><wbr />has<wbr />Music<wbr />Decoder<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#getMusicType%2Cptr.Music"
|
|
title="getMusicType(music: ptr Music): MusicType"><wbr />get<wbr />Music<wbr />Type<span class="attachedType">MusicType</span></a></li>
|
|
<li><a class="reference" href="#setPostMix%2Cproc%28pointer%2Cptr.Uint8%2Ccint%29%2Cpointer"
|
|
title="setPostMix(mixFunc: proc (udata: pointer; stream: ptr Uint8; len: cint) {.cdecl.};
|
|
arg: pointer)"><wbr />set<wbr />Post<wbr />Mix<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#hookMusic%2Cproc%28pointer%2Cptr.Uint8%2Ccint%29%2Cpointer"
|
|
title="hookMusic(mixFunc: proc (udata: pointer; stream: ptr Uint8; len: cint) {.cdecl.};
|
|
arg: pointer)"><wbr />hook<wbr />Music<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#hookMusicFinished%2Cproc%29"
|
|
title="hookMusicFinished(musicFinished: proc () {.cdecl.})"><wbr />hook<wbr />Music<wbr />Finished<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#getMusicHookData"
|
|
title="getMusicHookData(): pointer"><wbr />get<wbr />Music<wbr />Hook<wbr />Data<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#channelFinished%2Cproc%28cint%29"
|
|
title="channelFinished(channelFinished: proc (channel: cint) {.cdecl.})"><wbr />channel<wbr />Finished<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#registerEffect%2Ccint%2CEffectFunc_t%2CEffectDone_t%2Cpointer"
|
|
title="registerEffect(chan: cint; f: EffectFunc_t; d: EffectDone_t; arg: pointer): cint"><wbr />register<wbr />Effect<span class="attachedType">EffectFunc_t</span></a></li>
|
|
<li><a class="reference" href="#unregisterEffect%2Ccint%2CEffectFunc_t"
|
|
title="unregisterEffect(channel: cint; f: EffectFunc_t): cint"><wbr />unregister<wbr />Effect<span class="attachedType">EffectFunc_t</span></a></li>
|
|
<li><a class="reference" href="#unregisterAllEffects%2Ccint"
|
|
title="unregisterAllEffects(channel: cint): cint"><wbr />unregister<wbr />All<wbr />Effects<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#setPanning%2Ccint%2CUint8%2CUint8"
|
|
title="setPanning(channel: cint; left: Uint8; right: Uint8): cint"><wbr />set<wbr />Panning<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#setPosition%2Ccint%2CSint16%2CUint8"
|
|
title="setPosition(channel: cint; angle: Sint16; distance: Uint8): cint"><wbr />set<wbr />Position<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#setDistance%2Ccint%2CUint8"
|
|
title="setDistance(channel: cint; distance: Uint8): cint"><wbr />set<wbr />Distance<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#setReverseStereo%2Ccint%2Ccint"
|
|
title="setReverseStereo(channel: cint; flip: cint): cint"><wbr />set<wbr />Reverse<wbr />Stereo<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#reserveChannels%2Ccint"
|
|
title="reserveChannels(num: cint): cint"><wbr />reserve<wbr />Channels<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#groupChannel%2Ccint%2Ccint"
|
|
title="groupChannel(which: cint; tag: cint): cint"><wbr />group<wbr />Channel<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#groupChannels%2Ccint%2Ccint%2Ccint"
|
|
title="groupChannels(`from`: cint; to: cint; tag: cint): cint"><wbr />group<wbr />Channels<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#groupAvailable%2Ccint"
|
|
title="groupAvailable(tag: cint): cint"><wbr />group<wbr />Available<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#groupCount%2Ccint"
|
|
title="groupCount(tag: cint): cint"><wbr />group<wbr />Count<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#groupOldest%2Ccint"
|
|
title="groupOldest(tag: cint): cint"><wbr />group<wbr />Oldest<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#groupNewer%2Ccint"
|
|
title="groupNewer(tag: cint): cint"><wbr />group<wbr />Newer<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#playChannelTimed%2Ccint%2Cptr.Chunk%2Ccint%2Ccint"
|
|
title="playChannelTimed(channel: cint; chunk: ptr Chunk; loops: cint; ticks: cint): cint"><wbr />play<wbr />Channel<wbr />Timed<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#playMusic%2Cptr.Music%2Ccint"
|
|
title="playMusic(music: ptr Music; loops: cint): cint"><wbr />play<wbr />Music<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#fadeInMusic%2Cptr.Music%2Ccint%2Ccint"
|
|
title="fadeInMusic(music: ptr Music; loops: cint; ms: cint): cint"><wbr />fade<wbr />In<wbr />Music<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#fadeInMusicPos%2Cptr.Music%2Ccint%2Ccint%2Ccdouble"
|
|
title="fadeInMusicPos(music: ptr Music; loops: cint; ms: cint; position: cdouble): cint"><wbr />fade<wbr />In<wbr />Music<wbr />Pos<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#fadeInChannelTimed%2Ccint%2Cptr.Chunk%2Ccint%2Ccint%2Ccint"
|
|
title="fadeInChannelTimed(channel: cint; chunk: ptr Chunk; loops: cint; ms: cint; ticks: cint): cint"><wbr />fade<wbr />In<wbr />Channel<wbr />Timed<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#volume%2Ccint%2Ccint"
|
|
title="volume(channel: cint; volume: cint): cint"><wbr />volume<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#volumeChunk%2Cptr.Chunk%2Ccint"
|
|
title="volumeChunk(chunk: ptr Chunk; volume: cint): cint"><wbr />volume<wbr />Chunk<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#volumeMusic%2Ccint"
|
|
title="volumeMusic(volume: cint): cint"><wbr />volume<wbr />Music<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#haltChannel%2Ccint"
|
|
title="haltChannel(channel: cint): cint"><wbr />halt<wbr />Channel<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#haltGroup%2Ccint"
|
|
title="haltGroup(tag: cint): cint"><wbr />halt<wbr />Group<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#haltMusic"
|
|
title="haltMusic(): cint"><wbr />halt<wbr />Music<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#expireChannel%2Ccint%2Ccint"
|
|
title="expireChannel(channel: cint; ticks: cint): cint"><wbr />expire<wbr />Channel<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#fadeOutChannel%2Ccint%2Ccint"
|
|
title="fadeOutChannel(which: cint; ms: cint): cint"><wbr />fade<wbr />Out<wbr />Channel<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#fadeOutGroup%2Ccint%2Ccint"
|
|
title="fadeOutGroup(tag: cint; ms: cint): cint"><wbr />fade<wbr />Out<wbr />Group<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#fadeOutMusic%2Ccint"
|
|
title="fadeOutMusic(ms: cint): cint"><wbr />fade<wbr />Out<wbr />Music<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#fadingMusic"
|
|
title="fadingMusic(): Fading"><wbr />fading<wbr />Music<span class="attachedType">Fading</span></a></li>
|
|
<li><a class="reference" href="#fadingChannel%2Ccint"
|
|
title="fadingChannel(which: cint): Fading"><wbr />fading<wbr />Channel<span class="attachedType">Fading</span></a></li>
|
|
<li><a class="reference" href="#pause%2Ccint"
|
|
title="pause(channel: cint)"><wbr />pause<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#resume%2Ccint"
|
|
title="resume(channel: cint)"><wbr />resume<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#paused%2Ccint"
|
|
title="paused(channel: cint): cint"><wbr />paused<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#pauseMusic"
|
|
title="pauseMusic()"><wbr />pause<wbr />Music<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#resumeMusic"
|
|
title="resumeMusic()"><wbr />resume<wbr />Music<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#rewindMusic"
|
|
title="rewindMusic()"><wbr />rewind<wbr />Music<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#pausedMusic"
|
|
title="pausedMusic(): cint"><wbr />paused<wbr />Music<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#setMusicPosition%2Ccdouble"
|
|
title="setMusicPosition(position: cdouble): cint"><wbr />set<wbr />Music<wbr />Position<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#playing%2Ccint"
|
|
title="playing(channel: cint): cint"><wbr />playing<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#playingMusic"
|
|
title="playingMusic(): cint"><wbr />playing<wbr />Music<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#setMusicCMD%2Ccstring"
|
|
title="setMusicCMD(command: cstring): cint"><wbr />set<wbr />Music<wbr />CMD<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#setSynchroValue%2Ccint"
|
|
title="setSynchroValue(value: cint): cint"><wbr />set<wbr />Synchro<wbr />Value<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#getSynchroValue"
|
|
title="getSynchroValue(): cint"><wbr />get<wbr />Synchro<wbr />Value<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#setSoundFonts%2Ccstring"
|
|
title="setSoundFonts(paths: cstring): cint"><wbr />set<wbr />Sound<wbr />Fonts<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#getSoundFonts"
|
|
title="getSoundFonts(): cstring"><wbr />get<wbr />Sound<wbr />Fonts<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#eachSoundFont%2Cproc%28cstring%2Cpointer%29%2Cpointer"
|
|
title="eachSoundFont(function: proc (a1: cstring; a2: pointer): cint {.cdecl.}; data: pointer): cint"><wbr />each<wbr />Sound<wbr />Font<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#getChunk%2Ccint"
|
|
title="getChunk(channel: cint): ptr Chunk"><wbr />get<wbr />Chunk<span class="attachedType"></span></a></li>
|
|
<li><a class="reference" href="#closeAudio"
|
|
title="closeAudio()"><wbr />close<wbr />Audio<span class="attachedType"></span></a></li>
|
|
|
|
</ul>
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
<div class="nine columns" id="content">
|
|
<div id="tocRoot"></div>
|
|
|
|
<p class="module-desc"></p>
|
|
<div class="section" id="6">
|
|
<h1><a class="toc-backref" href="#6">Imports</a></h1>
|
|
<dl class="item">
|
|
<a class="reference external" href="sdl2.html">sdl2</a>
|
|
</dl></div>
|
|
<div class="section" id="7">
|
|
<h1><a class="toc-backref" href="#7">Types</a></h1>
|
|
<dl class="item">
|
|
<a id="MIX_InitFlags"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#MIX_InitFlags"><span class="Identifier">MIX_InitFlags</span></a> <span class="Other">=</span> <span class="Keyword">distinct</span> <span class="Identifier">cint</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="Fading"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#Fading"><span class="Identifier">Fading</span></a> <span class="Other">=</span> <span class="Keyword">distinct</span> <span class="Identifier">cint</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="MusicType"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#MusicType"><span class="Identifier">MusicType</span></a> <span class="Other">=</span> <span class="Keyword">distinct</span> <span class="Identifier">cint</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="Chunk"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#Chunk"><span class="Identifier">Chunk</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">bycopy</span></span><span class="Other">.}</span></span> <span class="Other">=</span> <span class="Keyword">object</span>
|
|
<span class="Identifier">allocated</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cint</span>
|
|
<span class="Identifier">abuf</span><span class="Operator">*</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2.html#Uint8"><span class="Identifier">Uint8</span></a>
|
|
<span class="Identifier">alen</span><span class="Operator">*</span><span class="Other">:</span> <a href="sdl2.html#Uint32"><span class="Identifier">Uint32</span></a>
|
|
<span class="Identifier">volume</span><span class="Operator">*</span><span class="Other">:</span> <a href="sdl2.html#Uint8"><span class="Identifier">Uint8</span></a> <span class="Comment">## ::</span>
|
|
<span class="Comment">## Per-sample volume, 0-128</span>
|
|
</pre></dt>
|
|
<dd>
|
|
|
|
<pre>The internal format for an audio chunk</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="Music"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#Music"><span class="Identifier">Music</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">incompleteStruct</span></span><span class="Other">.}</span></span> <span class="Other">=</span> <span class="Keyword">object</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="EffectFunc_t"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#EffectFunc_t"><span class="Identifier">EffectFunc_t</span></a> <span class="Other">=</span> <span class="Keyword">proc</span> <span class="Other">(</span><span class="Identifier">chan</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">stream</span><span class="Other">:</span> <span class="Identifier">pointer</span><span class="Other">;</span> <span class="Identifier">len</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">udata</span><span class="Other">:</span> <span class="Identifier">pointer</span><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="EffectDone_t"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#EffectDone_t"><span class="Identifier">EffectDone_t</span></a> <span class="Other">=</span> <span class="Keyword">proc</span> <span class="Other">(</span><span class="Identifier">chan</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">udata</span><span class="Other">:</span> <span class="Identifier">pointer</span><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
</dl></div>
|
|
<div class="section" id="10">
|
|
<h1><a class="toc-backref" href="#10">Consts</a></h1>
|
|
<dl class="item">
|
|
<a id="SDLmixerStd"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#SDLmixerStd"><span class="Identifier">SDLmixerStd</span></a> <span class="Other">=</span> <span class="DecNumber">false</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="SDLmixerGit"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#SDLmixerGit"><span class="Identifier">SDLmixerGit</span></a> <span class="Other">=</span> <span class="DecNumber">false</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="SDLmixerDL"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#SDLmixerDL"><span class="Identifier">SDLmixerDL</span></a> <span class="Other">=</span> <span class="DecNumber">true</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="SDLmixerStatic"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#SDLmixerStatic"><span class="Identifier">SDLmixerStatic</span></a> <span class="Other">=</span> <span class="DecNumber">true</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="SDLmixerSetVer"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#SDLmixerSetVer"><span class="Identifier">SDLmixerSetVer</span></a> <span class="Other">=</span> <span class="StringLit">""</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="SDLmixerLPath"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#SDLmixerLPath"><span class="Identifier">SDLmixerLPath</span></a> <span class="Other">=</span> <span class="StringLit">"/Users/joey/Projects/nim-sdl2/src/build/sdl2_mixer/build/.libs/libSDL2_mixer.a"</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="SDLmixerPath"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#SDLmixerPath"><span class="Identifier">SDLmixerPath</span></a> <span class="Other">=</span> <span class="StringLit">"/Users/joey/Projects/nim-sdl2/src/build/sdl2_mixer/SDL_mixer.h"</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="SetError"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#SetError"><span class="Identifier">SetError</span></a> <span class="Other">=</span> <span class="StringLit">""</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="GetError"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#GetError"><span class="Identifier">GetError</span></a> <span class="Other">=</span> <span class="StringLit">""</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="ClearError"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#ClearError"><span class="Identifier">ClearError</span></a> <span class="Other">=</span> <span class="StringLit">""</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="MIXER_MAJOR_VERSION"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#MIXER_MAJOR_VERSION"><span class="Identifier">MIXER_MAJOR_VERSION</span></a> <span class="Other">=</span> <span class="DecNumber">2</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="MIXER_MINOR_VERSION"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#MIXER_MINOR_VERSION"><span class="Identifier">MIXER_MINOR_VERSION</span></a> <span class="Other">=</span> <span class="DecNumber">0</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="MIXER_PATCHLEVEL"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#MIXER_PATCHLEVEL"><span class="Identifier">MIXER_PATCHLEVEL</span></a> <span class="Other">=</span> <span class="DecNumber">4</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="MIX_MAJOR_VERSION"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#MIX_MAJOR_VERSION"><span class="Identifier">MIX_MAJOR_VERSION</span></a> <span class="Other">=</span> <span class="DecNumber">2</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="MIX_MINOR_VERSION"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#MIX_MINOR_VERSION"><span class="Identifier">MIX_MINOR_VERSION</span></a> <span class="Other">=</span> <span class="DecNumber">0</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="MIX_PATCHLEVEL"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#MIX_PATCHLEVEL"><span class="Identifier">MIX_PATCHLEVEL</span></a> <span class="Other">=</span> <span class="DecNumber">4</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="MIX_INIT_FLAC"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#MIX_INIT_FLAC"><span class="Identifier">MIX_INIT_FLAC</span></a> <span class="Other">=</span> <span class="DecNumber">1'i32</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="MIX_INIT_MOD"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#MIX_INIT_MOD"><span class="Identifier">MIX_INIT_MOD</span></a> <span class="Other">=</span> <span class="DecNumber">2'i32</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="MIX_INIT_MP3"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#MIX_INIT_MP3"><span class="Identifier">MIX_INIT_MP3</span></a> <span class="Other">=</span> <span class="DecNumber">8'i32</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="MIX_INIT_OGG"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#MIX_INIT_OGG"><span class="Identifier">MIX_INIT_OGG</span></a> <span class="Other">=</span> <span class="DecNumber">16'i32</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="MIX_INIT_MID"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#MIX_INIT_MID"><span class="Identifier">MIX_INIT_MID</span></a> <span class="Other">=</span> <span class="DecNumber">32'i32</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="MIX_INIT_OPUS"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#MIX_INIT_OPUS"><span class="Identifier">MIX_INIT_OPUS</span></a> <span class="Other">=</span> <span class="DecNumber">64'i32</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="MIX_CHANNELS"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#MIX_CHANNELS"><span class="Identifier">MIX_CHANNELS</span></a> <span class="Other">=</span> <span class="DecNumber">8</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="MIX_DEFAULT_FREQUENCY"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#MIX_DEFAULT_FREQUENCY"><span class="Identifier">MIX_DEFAULT_FREQUENCY</span></a> <span class="Other">=</span> <span class="DecNumber">22050</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="MIX_DEFAULT_CHANNELS"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#MIX_DEFAULT_CHANNELS"><span class="Identifier">MIX_DEFAULT_CHANNELS</span></a> <span class="Other">=</span> <span class="DecNumber">2</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="MIX_NO_FADING"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#MIX_NO_FADING"><span class="Identifier">MIX_NO_FADING</span></a> <span class="Other">=</span> <span class="DecNumber">0'i32</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="MIX_FADING_OUT"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#MIX_FADING_OUT"><span class="Identifier">MIX_FADING_OUT</span></a> <span class="Other">=</span> <span class="DecNumber">1</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="MIX_FADING_IN"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#MIX_FADING_IN"><span class="Identifier">MIX_FADING_IN</span></a> <span class="Other">=</span> <span class="DecNumber">2</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="MUS_NONE"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#MUS_NONE"><span class="Identifier">MUS_NONE</span></a> <span class="Other">=</span> <span class="DecNumber">0'i32</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="MUS_CMD"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#MUS_CMD"><span class="Identifier">MUS_CMD</span></a> <span class="Other">=</span> <span class="DecNumber">1</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="MUS_WAV"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#MUS_WAV"><span class="Identifier">MUS_WAV</span></a> <span class="Other">=</span> <span class="DecNumber">2</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="MUS_MOD"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#MUS_MOD"><span class="Identifier">MUS_MOD</span></a> <span class="Other">=</span> <span class="DecNumber">3</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="MUS_MID"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#MUS_MID"><span class="Identifier">MUS_MID</span></a> <span class="Other">=</span> <span class="DecNumber">4</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="MUS_OGG"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#MUS_OGG"><span class="Identifier">MUS_OGG</span></a> <span class="Other">=</span> <span class="DecNumber">5</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="MUS_MP3"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#MUS_MP3"><span class="Identifier">MUS_MP3</span></a> <span class="Other">=</span> <span class="DecNumber">6</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="MUS_MP3_MAD_UNUSED"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#MUS_MP3_MAD_UNUSED"><span class="Identifier">MUS_MP3_MAD_UNUSED</span></a> <span class="Other">=</span> <span class="DecNumber">7</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="MUS_FLAC"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#MUS_FLAC"><span class="Identifier">MUS_FLAC</span></a> <span class="Other">=</span> <span class="DecNumber">8</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="MUS_MODPLUG_UNUSED"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#MUS_MODPLUG_UNUSED"><span class="Identifier">MUS_MODPLUG_UNUSED</span></a> <span class="Other">=</span> <span class="DecNumber">9</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="MUS_OPUS"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#MUS_OPUS"><span class="Identifier">MUS_OPUS</span></a> <span class="Other">=</span> <span class="DecNumber">10</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="MIX_CHANNEL_POST"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#MIX_CHANNEL_POST"><span class="Identifier">MIX_CHANNEL_POST</span></a> <span class="Other">=</span> <span class="DecNumber">-2</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="MIX_EFFECTSMAXSPEED"></a>
|
|
<dt><pre><a href="sdl2_mixer.html#MIX_EFFECTSMAXSPEED"><span class="Identifier">MIX_EFFECTSMAXSPEED</span></a> <span class="Other">=</span> <span class="StringLit">"MIX_EFFECTSMAXSPEED"</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
</dl></div>
|
|
<div class="section" id="12">
|
|
<h1><a class="toc-backref" href="#12">Procs</a></h1>
|
|
<dl class="item">
|
|
<a id="linked_Version"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#linked_Version"><span class="Identifier">linked_Version</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2.html#Version"><span class="Identifier">Version</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_Linked_Version"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>This function gets the version of the dynamically linked SDL_mixer library.
|
|
it should NOT be used to fill a version structure, instead you should
|
|
use the SDL_MIXER_VERSION() macro.</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="init,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#init%2Ccint"><span class="Identifier">init</span></a><span class="Other">(</span><span class="Identifier">flags</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_Init"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Loads dynamic libraries and prepares them for use. Flags should be
|
|
one or more flags from MIX_InitFlags OR'd together.
|
|
It returns the flags successfully initialized, or 0 on failure.</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="quit"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#quit"><span class="Identifier">quit</span></a><span class="Other">(</span><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_Quit"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Unloads libraries loaded with Mix_Init</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="openAudio,cint,Uint16,cint,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#openAudio%2Ccint%2CUint16%2Ccint%2Ccint"><span class="Identifier">openAudio</span></a><span class="Other">(</span><span class="Identifier">frequency</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">format</span><span class="Other">:</span> <a href="sdl2.html#Uint16"><span class="Identifier">Uint16</span></a><span class="Other">;</span> <span class="Identifier">channels</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">chunksize</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
|
|
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_OpenAudio"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Open the mixer with a certain audio format</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="openAudioDevice,cint,Uint16,cint,cint,cstring,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#openAudioDevice%2Ccint%2CUint16%2Ccint%2Ccint%2Ccstring%2Ccint"><span class="Identifier">openAudioDevice</span></a><span class="Other">(</span><span class="Identifier">frequency</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">format</span><span class="Other">:</span> <a href="sdl2.html#Uint16"><span class="Identifier">Uint16</span></a><span class="Other">;</span> <span class="Identifier">channels</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">chunksize</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span>
|
|
<span class="Identifier">device</span><span class="Other">:</span> <span class="Identifier">cstring</span><span class="Other">;</span> <span class="Identifier">allowedChanges</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
|
|
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_OpenAudioDevice"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Open the mixer with specific device and certain audio format</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="allocateChannels,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#allocateChannels%2Ccint"><span class="Identifier">allocateChannels</span></a><span class="Other">(</span><span class="Identifier">numchans</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_AllocateChannels"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Dynamically change the number of channels managed by the mixer.
|
|
If decreasing the number of channels, the upper channels are
|
|
stopped.
|
|
This function returns the new number of allocated channels.</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="querySpec,ptr.cint,ptr.Uint16,ptr.cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#querySpec%2Cptr.cint%2Cptr.Uint16%2Cptr.cint"><span class="Identifier">querySpec</span></a><span class="Other">(</span><span class="Identifier">frequency</span><span class="Other">:</span> <span class="Keyword">ptr</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">format</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2.html#Uint16"><span class="Identifier">Uint16</span></a><span class="Other">;</span> <span class="Identifier">channels</span><span class="Other">:</span> <span class="Keyword">ptr</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
|
|
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_QuerySpec"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Find out what the actual audio device parameters are.
|
|
This function returns 1 if the audio has been opened, 0 otherwise.</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="loadWAV_RW,ptr.RWops,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#loadWAV_RW%2Cptr.RWops%2Ccint"><span class="Identifier">loadWAV_RW</span></a><span class="Other">(</span><span class="Identifier">src</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2.html#RWops"><span class="Identifier">RWops</span></a><span class="Other">;</span> <span class="Identifier">freesrc</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_mixer.html#Chunk"><span class="Identifier">Chunk</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_LoadWAV_RW"</span><span class="Other">,</span>
|
|
<span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Load a wave file or a music (.mod .s3m .it .xm) file</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="loadMUS,cstring"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#loadMUS%2Ccstring"><span class="Identifier">loadMUS</span></a><span class="Other">(</span><span class="Identifier">file</span><span class="Other">:</span> <span class="Identifier">cstring</span><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_mixer.html#Music"><span class="Identifier">Music</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_LoadMUS"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="loadMUS_RW,ptr.RWops,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#loadMUS_RW%2Cptr.RWops%2Ccint"><span class="Identifier">loadMUS_RW</span></a><span class="Other">(</span><span class="Identifier">src</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2.html#RWops"><span class="Identifier">RWops</span></a><span class="Other">;</span> <span class="Identifier">freesrc</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_mixer.html#Music"><span class="Identifier">Music</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_LoadMUS_RW"</span><span class="Other">,</span>
|
|
<span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Load a music file from an SDL_RWop object (Ogg and MikMod specific currently)
|
|
Matt Campbell (matt@campbellhome.dhs.org) April 2000</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="loadMUSType_RW,ptr.RWops,MusicType,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#loadMUSType_RW%2Cptr.RWops%2CMusicType%2Ccint"><span class="Identifier">loadMUSType_RW</span></a><span class="Other">(</span><span class="Identifier">src</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2.html#RWops"><span class="Identifier">RWops</span></a><span class="Other">;</span> <span class="Identifier">kind</span><span class="Other">:</span> <a href="sdl2_mixer.html#MusicType"><span class="Identifier">MusicType</span></a><span class="Other">;</span> <span class="Identifier">freesrc</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_mixer.html#Music"><span class="Identifier">Music</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
|
|
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_LoadMUSType_RW"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Load a music file from an SDL_RWop object assuming a specific format</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="quickLoad_WAV,ptr.Uint8"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#quickLoad_WAV%2Cptr.Uint8"><span class="Identifier">quickLoad_WAV</span></a><span class="Other">(</span><span class="Identifier">mem</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2.html#Uint8"><span class="Identifier">Uint8</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_mixer.html#Chunk"><span class="Identifier">Chunk</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_QuickLoad_WAV"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Load a wave file of the mixer format from a memory buffer</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="quickLoad_RAW,ptr.Uint8,Uint32"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#quickLoad_RAW%2Cptr.Uint8%2CUint32"><span class="Identifier">quickLoad_RAW</span></a><span class="Other">(</span><span class="Identifier">mem</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2.html#Uint8"><span class="Identifier">Uint8</span></a><span class="Other">;</span> <span class="Identifier">len</span><span class="Other">:</span> <a href="sdl2.html#Uint32"><span class="Identifier">Uint32</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_mixer.html#Chunk"><span class="Identifier">Chunk</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
|
|
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_QuickLoad_RAW"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Load raw audio data of the mixer format from a memory buffer</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="freeChunk,ptr.Chunk"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#freeChunk%2Cptr.Chunk"><span class="Identifier">freeChunk</span></a><span class="Other">(</span><span class="Identifier">chunk</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_mixer.html#Chunk"><span class="Identifier">Chunk</span></a><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_FreeChunk"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Free an audio chunk previously loaded</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="freeMusic,ptr.Music"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#freeMusic%2Cptr.Music"><span class="Identifier">freeMusic</span></a><span class="Other">(</span><span class="Identifier">music</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_mixer.html#Music"><span class="Identifier">Music</span></a><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_FreeMusic"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="getNumChunkDecoders"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#getNumChunkDecoders"><span class="Identifier">getNumChunkDecoders</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_GetNumChunkDecoders"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Get a list of chunk/music decoders that this build of SDL_mixer provides.
|
|
This list can change between builds AND runs of the program, if external
|
|
libraries that add functionality become available.
|
|
You must successfully call Mix_OpenAudio() before calling these functions.
|
|
This API is only available in SDL_mixer 1.2.9 and later.
|
|
usage...
|
|
int i;
|
|
const int total = Mix_GetNumChunkDecoders();
|
|
for (i = 0; i < total; i++)
|
|
printf("Supported chunk decoder: [%s]\n", Mix_GetChunkDecoder(i));
|
|
Appearing in this list doesn't promise your specific audio file will
|
|
decode...but it's handy to know if you have, say, a functioning Timidity
|
|
install.
|
|
These return values are static, read-only data; do not modify or free it.
|
|
The pointers remain valid until you call Mix_CloseAudio().</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="getChunkDecoder,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#getChunkDecoder%2Ccint"><span class="Identifier">getChunkDecoder</span></a><span class="Other">(</span><span class="Identifier">index</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cstring</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_GetChunkDecoder"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="hasChunkDecoder,cstring"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#hasChunkDecoder%2Ccstring"><span class="Identifier">hasChunkDecoder</span></a><span class="Other">(</span><span class="Identifier">name</span><span class="Other">:</span> <span class="Identifier">cstring</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_HasChunkDecoder"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="getNumMusicDecoders"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#getNumMusicDecoders"><span class="Identifier">getNumMusicDecoders</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_GetNumMusicDecoders"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="getMusicDecoder,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#getMusicDecoder%2Ccint"><span class="Identifier">getMusicDecoder</span></a><span class="Other">(</span><span class="Identifier">index</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cstring</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_GetMusicDecoder"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="hasMusicDecoder,cstring"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#hasMusicDecoder%2Ccstring"><span class="Identifier">hasMusicDecoder</span></a><span class="Other">(</span><span class="Identifier">name</span><span class="Other">:</span> <span class="Identifier">cstring</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_HasMusicDecoder"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="getMusicType,ptr.Music"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#getMusicType%2Cptr.Music"><span class="Identifier">getMusicType</span></a><span class="Other">(</span><span class="Identifier">music</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_mixer.html#Music"><span class="Identifier">Music</span></a><span class="Other">)</span><span class="Other">:</span> <a href="sdl2_mixer.html#MusicType"><span class="Identifier">MusicType</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_GetMusicType"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Find out the music format of a mixer music, or the currently playing
|
|
music, if 'music' is NULL.</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="setPostMix,proc(pointer,ptr.Uint8,cint),pointer"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#setPostMix%2Cproc%28pointer%2Cptr.Uint8%2Ccint%29%2Cpointer"><span class="Identifier">setPostMix</span></a><span class="Other">(</span><span class="Identifier">mixFunc</span><span class="Other">:</span> <span class="Keyword">proc</span> <span class="Other">(</span><span class="Identifier">udata</span><span class="Other">:</span> <span class="Identifier">pointer</span><span class="Other">;</span> <span class="Identifier">stream</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2.html#Uint8"><span class="Identifier">Uint8</span></a><span class="Other">;</span> <span class="Identifier">len</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">cdecl</span></span><span class="Other">.}</span></span><span class="Other">;</span>
|
|
<span class="Identifier">arg</span><span class="Other">:</span> <span class="Identifier">pointer</span><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_SetPostMix"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Set a function that is called after all mixing is performed.
|
|
This can be used to provide real-time visual display of the audio stream
|
|
or add a custom mixer filter for the stream data.</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="hookMusic,proc(pointer,ptr.Uint8,cint),pointer"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#hookMusic%2Cproc%28pointer%2Cptr.Uint8%2Ccint%29%2Cpointer"><span class="Identifier">hookMusic</span></a><span class="Other">(</span><span class="Identifier">mixFunc</span><span class="Other">:</span> <span class="Keyword">proc</span> <span class="Other">(</span><span class="Identifier">udata</span><span class="Other">:</span> <span class="Identifier">pointer</span><span class="Other">;</span> <span class="Identifier">stream</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2.html#Uint8"><span class="Identifier">Uint8</span></a><span class="Other">;</span> <span class="Identifier">len</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">cdecl</span></span><span class="Other">.}</span></span><span class="Other">;</span>
|
|
<span class="Identifier">arg</span><span class="Other">:</span> <span class="Identifier">pointer</span><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_HookMusic"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Add your own music player or additional mixer function.
|
|
If 'mix_func' is NULL, the default music player is re-enabled.</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="hookMusicFinished,proc)"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#hookMusicFinished%2Cproc%29"><span class="Identifier">hookMusicFinished</span></a><span class="Other">(</span><span class="Identifier">musicFinished</span><span class="Other">:</span> <span class="Keyword">proc</span> <span class="Other">(</span><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">cdecl</span></span><span class="Other">.}</span></span><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
|
|
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_HookMusicFinished"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Add your own callback for when the music has finished playing or when it is
|
|
stopped from a call to Mix_HaltMusic.</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="getMusicHookData"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#getMusicHookData"><span class="Identifier">getMusicHookData</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">pointer</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_GetMusicHookData"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Get a pointer to the user data for the current music hook</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="channelFinished,proc(cint)"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#channelFinished%2Cproc%28cint%29"><span class="Identifier">channelFinished</span></a><span class="Other">(</span><span class="Identifier">channelFinished</span><span class="Other">:</span> <span class="Keyword">proc</span> <span class="Other">(</span><span class="Identifier">channel</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">cdecl</span></span><span class="Other">.}</span></span><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
|
|
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_ChannelFinished"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Add your own callback when a channel has finished playing. NULL
|
|
to disable callback. The callback may be called from the mixer's audio
|
|
callback or it could be called as a result of Mix_HaltChannel(), etc.
|
|
do not call SDL_LockAudio() from this callback; you will either be
|
|
inside the audio callback, or SDL_mixer will explicitly lock the audio
|
|
before calling your callback.</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="registerEffect,cint,EffectFunc_t,EffectDone_t,pointer"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#registerEffect%2Ccint%2CEffectFunc_t%2CEffectDone_t%2Cpointer"><span class="Identifier">registerEffect</span></a><span class="Other">(</span><span class="Identifier">chan</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">f</span><span class="Other">:</span> <a href="sdl2_mixer.html#EffectFunc_t"><span class="Identifier">EffectFunc_t</span></a><span class="Other">;</span> <span class="Identifier">d</span><span class="Other">:</span> <a href="sdl2_mixer.html#EffectDone_t"><span class="Identifier">EffectDone_t</span></a><span class="Other">;</span> <span class="Identifier">arg</span><span class="Other">:</span> <span class="Identifier">pointer</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
|
|
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_RegisterEffect"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Register a special effect function. At mixing time, the channel data is
|
|
copied into a buffer and passed through each registered effect function.
|
|
After it passes through all the functions, it is mixed into the final
|
|
output stream. The copy to buffer is performed once, then each effect
|
|
function performs on the output of the previous effect. Understand that
|
|
this extra copy to a buffer is not performed if there are no effects
|
|
registered for a given chunk, which saves CPU cycles, and any given
|
|
effect will be extra cycles, too, so it is crucial that your code run
|
|
fast. Also note that the data that your function is given is in the
|
|
format of the sound device, and not the format you gave to Mix_OpenAudio(),
|
|
although they may in reality be the same. This is an unfortunate but
|
|
necessary speed concern. Use Mix_QuerySpec() to determine if you can
|
|
handle the data before you register your effect, and take appropriate
|
|
actions.
|
|
You may also specify a callback (Mix_EffectDone_t) that is called when
|
|
the channel finishes playing. This gives you a more fine-grained control
|
|
than Mix_ChannelFinished(), in case you need to free effect-specific
|
|
resources, etc. If you don't need this, you can specify NULL.
|
|
You may set the callbacks before or after calling Mix_PlayChannel().
|
|
Things like Mix_SetPanning() are just internal special effect functions,
|
|
so if you are using that, you've already incurred the overhead of a copy
|
|
to a separate buffer, and that these effects will be in the queue with
|
|
any functions you've registered. The list of registered effects for a
|
|
channel is reset when a chunk finishes playing, so you need to explicitly
|
|
set them with each call to Mix_PlayChannel().
|
|
You may also register a special effect function that is to be run after
|
|
final mixing occurs. The rules for these callbacks are identical to those
|
|
in Mix_RegisterEffect, but they are run after all the channels and the
|
|
music have been mixed into a single stream, whereas channel-specific
|
|
effects run on a given channel before any other mixing occurs. These
|
|
global effect callbacks are call "posteffects". Posteffects only have
|
|
their Mix_EffectDone_t function called when they are unregistered (since
|
|
the main output stream is never "done" in the same sense as a channel).
|
|
You must unregister them manually when you've had enough. Your callback
|
|
will be told that the channel being mixed is (MIX_CHANNEL_POST) if the
|
|
processing is considered a posteffect.
|
|
|
|
After all these effects have finished processing, the callback registered
|
|
through Mix_SetPostMix() runs, and then the stream goes to the audio
|
|
device.
|
|
|
|
DO NOT EVER call SDL_LockAudio() from your callback function!
|
|
|
|
returns zero if error (no such channel), nonzero if added.
|
|
Error messages can be retrieved from Mix_GetError().</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="unregisterEffect,cint,EffectFunc_t"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#unregisterEffect%2Ccint%2CEffectFunc_t"><span class="Identifier">unregisterEffect</span></a><span class="Other">(</span><span class="Identifier">channel</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">f</span><span class="Other">:</span> <a href="sdl2_mixer.html#EffectFunc_t"><span class="Identifier">EffectFunc_t</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
|
|
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_UnregisterEffect"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>You may not need to call this explicitly, unless you need to stop an
|
|
effect from processing in the middle of a chunk's playback.
|
|
Posteffects are never implicitly unregistered as they are for channels,
|
|
but they may be explicitly unregistered through this function by
|
|
specifying MIX_CHANNEL_POST for a channel.
|
|
returns zero if error (no such channel or effect), nonzero if removed.
|
|
Error messages can be retrieved from Mix_GetError().</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="unregisterAllEffects,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#unregisterAllEffects%2Ccint"><span class="Identifier">unregisterAllEffects</span></a><span class="Other">(</span><span class="Identifier">channel</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
|
|
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_UnregisterAllEffects"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>You may not need to call this explicitly, unless you need to stop all
|
|
effects from processing in the middle of a chunk's playback. Note that
|
|
this will also shut off some internal effect processing, since
|
|
Mix_SetPanning() and others may use this API under the hood. This is
|
|
called internally when a channel completes playback.
|
|
Posteffects are never implicitly unregistered as they are for channels,
|
|
but they may be explicitly unregistered through this function by
|
|
specifying MIX_CHANNEL_POST for a channel.
|
|
returns zero if error (no such channel), nonzero if all effects removed.
|
|
Error messages can be retrieved from Mix_GetError().</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="setPanning,cint,Uint8,Uint8"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#setPanning%2Ccint%2CUint8%2CUint8"><span class="Identifier">setPanning</span></a><span class="Other">(</span><span class="Identifier">channel</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">left</span><span class="Other">:</span> <a href="sdl2.html#Uint8"><span class="Identifier">Uint8</span></a><span class="Other">;</span> <span class="Identifier">right</span><span class="Other">:</span> <a href="sdl2.html#Uint8"><span class="Identifier">Uint8</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
|
|
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_SetPanning"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>These are the internally-defined mixing effects. They use the same API that
|
|
effects defined in the application use, but are provided here as a
|
|
convenience. Some effects can reduce their quality or use more memory in
|
|
the name of speed; to enable this, make sure the environment variable
|
|
MIX_EFFECTSMAXSPEED (see above) is defined before you call
|
|
Mix_OpenAudio().
|
|
Set the panning of a channel. The left and right channels are specified
|
|
as integers between 0 and 255, quietest to loudest, respectively.
|
|
|
|
Technically, this is just individual volume control for a sample with
|
|
two (stereo) channels, so it can be used for more than just panning.
|
|
If you want real panning, call it like this:
|
|
|
|
Mix_SetPanning(channel, left, 255 - left);
|
|
|
|
...which isn't so hard.
|
|
|
|
Setting (channel) to MIX_CHANNEL_POST registers this as a posteffect, and
|
|
the panning will be done to the final mixed stream before passing it on
|
|
to the audio device.
|
|
|
|
This uses the Mix_RegisterEffect() API internally, and returns without
|
|
registering the effect function if the audio device is not configured
|
|
for stereo output. Setting both (left) and (right) to 255 causes this
|
|
effect to be unregistered, since that is the data's normal state.
|
|
|
|
returns zero if error (no such channel or Mix_RegisterEffect() fails),
|
|
nonzero if panning effect enabled. Note that an audio device in mono
|
|
mode is a no-op, but this call will return successful in that case.
|
|
Error messages can be retrieved from Mix_GetError().</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="setPosition,cint,Sint16,Uint8"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#setPosition%2Ccint%2CSint16%2CUint8"><span class="Identifier">setPosition</span></a><span class="Other">(</span><span class="Identifier">channel</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">angle</span><span class="Other">:</span> <a href="sdl2.html#Sint16"><span class="Identifier">Sint16</span></a><span class="Other">;</span> <span class="Identifier">distance</span><span class="Other">:</span> <a href="sdl2.html#Uint8"><span class="Identifier">Uint8</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
|
|
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_SetPosition"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Set the position of a channel. (angle) is an integer from 0 to 360, that
|
|
specifies the location of the sound in relation to the listener. (angle)
|
|
will be reduced as neccesary (540 becomes 180 degrees, -100 becomes 260).
|
|
Angle 0 is due north, and rotates clockwise as the value increases.
|
|
For efficiency, the precision of this effect may be limited (angles 1
|
|
through 7 might all produce the same effect, 8 through 15 are equal, etc).
|
|
(distance) is an integer between 0 and 255 that specifies the space
|
|
between the sound and the listener. The larger the number, the further
|
|
away the sound is. Using 255 does not guarantee that the channel will be
|
|
culled from the mixing process or be completely silent. For efficiency,
|
|
the precision of this effect may be limited (distance 0 through 5 might
|
|
all produce the same effect, 6 through 10 are equal, etc). Setting (angle)
|
|
and (distance) to 0 unregisters this effect, since the data would be
|
|
unchanged.
|
|
|
|
If you need more precise positional audio, consider using OpenAL for
|
|
spatialized effects instead of SDL_mixer. This is only meant to be a
|
|
basic effect for simple "3D" games.
|
|
|
|
If the audio device is configured for mono output, then you won't get
|
|
any effectiveness from the angle; however, distance attenuation on the
|
|
channel will still occur. While this effect will function with stereo
|
|
voices, it makes more sense to use voices with only one channel of sound,
|
|
so when they are mixed through this effect, the positioning will sound
|
|
correct. You can convert them to mono through SDL before giving them to
|
|
the mixer in the first place if you like.
|
|
|
|
Setting (channel) to MIX_CHANNEL_POST registers this as a posteffect, and
|
|
the positioning will be done to the final mixed stream before passing it
|
|
on to the audio device.
|
|
|
|
This is a convenience wrapper over Mix_SetDistance() and Mix_SetPanning().
|
|
|
|
returns zero if error (no such channel or Mix_RegisterEffect() fails),
|
|
nonzero if position effect is enabled.
|
|
Error messages can be retrieved from Mix_GetError().</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="setDistance,cint,Uint8"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#setDistance%2Ccint%2CUint8"><span class="Identifier">setDistance</span></a><span class="Other">(</span><span class="Identifier">channel</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">distance</span><span class="Other">:</span> <a href="sdl2.html#Uint8"><span class="Identifier">Uint8</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_SetDistance"</span><span class="Other">,</span>
|
|
<span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Set the "distance" of a channel. (distance) is an integer from 0 to 255
|
|
that specifies the location of the sound in relation to the listener.
|
|
Distance 0 is overlapping the listener, and 255 is as far away as possible
|
|
A distance of 255 does not guarantee silence; in such a case, you might
|
|
want to try changing the chunk's volume, or just cull the sample from the
|
|
mixing process with Mix_HaltChannel().
|
|
For efficiency, the precision of this effect may be limited (distances 1
|
|
through 7 might all produce the same effect, 8 through 15 are equal, etc).
|
|
(distance) is an integer between 0 and 255 that specifies the space
|
|
between the sound and the listener. The larger the number, the further
|
|
away the sound is.
|
|
Setting (distance) to 0 unregisters this effect, since the data would be
|
|
unchanged.
|
|
If you need more precise positional audio, consider using OpenAL for
|
|
spatialized effects instead of SDL_mixer. This is only meant to be a
|
|
basic effect for simple "3D" games.
|
|
|
|
Setting (channel) to MIX_CHANNEL_POST registers this as a posteffect, and
|
|
the distance attenuation will be done to the final mixed stream before
|
|
passing it on to the audio device.
|
|
|
|
This uses the Mix_RegisterEffect() API internally.
|
|
|
|
returns zero if error (no such channel or Mix_RegisterEffect() fails),
|
|
nonzero if position effect is enabled.
|
|
Error messages can be retrieved from Mix_GetError().</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="setReverseStereo,cint,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#setReverseStereo%2Ccint%2Ccint"><span class="Identifier">setReverseStereo</span></a><span class="Other">(</span><span class="Identifier">channel</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">flip</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
|
|
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_SetReverseStereo"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>!!! FIXME : Haven't implemented, since the effect goes past the
|
|
end of the sound buffer. Will have to think about this.
|
|
--ryan.
|
|
Causes a channel to reverse its stereo. This is handy if the user has his
|
|
speakers hooked up backwards, or you would like to have a minor bit of
|
|
psychedelia in your sound code. :) Calling this function with (flip)
|
|
set to non-zero reverses the chunks's usual channels. If (flip) is zero,
|
|
the effect is unregistered.
|
|
|
|
This uses the Mix_RegisterEffect() API internally, and thus is probably
|
|
more CPU intensive than having the user just plug in his speakers
|
|
correctly. Mix_SetReverseStereo() returns without registering the effect
|
|
function if the audio device is not configured for stereo output.
|
|
|
|
If you specify MIX_CHANNEL_POST for (channel), then this the effect is used
|
|
on the final mixed stream before sending it on to the audio device (a
|
|
posteffect).
|
|
|
|
returns zero if error (no such channel or Mix_RegisterEffect() fails),
|
|
nonzero if reversing effect is enabled. Note that an audio device in mono
|
|
mode is a no-op, but this call will return successful in that case.
|
|
Error messages can be retrieved from Mix_GetError().</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="reserveChannels,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#reserveChannels%2Ccint"><span class="Identifier">reserveChannels</span></a><span class="Other">(</span><span class="Identifier">num</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_ReserveChannels"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>end of effects API. --ryan.
|
|
Reserve the first channels (0 -> n-1) for the application, i.e. don't allocate
|
|
them dynamically to the next sample if requested with a -1 value below.
|
|
Returns the number of reserved channels.</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="groupChannel,cint,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#groupChannel%2Ccint%2Ccint"><span class="Identifier">groupChannel</span></a><span class="Other">(</span><span class="Identifier">which</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">tag</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_GroupChannel"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Channel grouping functions
|
|
Attach a tag to a channel. A tag can be assigned to several mixer
|
|
channels, to form groups of channels.
|
|
If 'tag' is -1, the tag is removed (actually -1 is the tag used to
|
|
represent the group of all the channels).
|
|
Returns true if everything was OK.</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="groupChannels,cint,cint,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#groupChannels%2Ccint%2Ccint%2Ccint"><span class="Identifier">groupChannels</span></a><span class="Other">(</span><span class="Other">`</span><span class="Keyword">from</span><span class="Other">`</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">to</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">tag</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
|
|
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_GroupChannels"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Assign several consecutive channels to a group</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="groupAvailable,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#groupAvailable%2Ccint"><span class="Identifier">groupAvailable</span></a><span class="Other">(</span><span class="Identifier">tag</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_GroupAvailable"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Finds the first available channel in a group of channels,
|
|
returning -1 if none are available.</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="groupCount,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#groupCount%2Ccint"><span class="Identifier">groupCount</span></a><span class="Other">(</span><span class="Identifier">tag</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_GroupCount"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Returns the number of channels in a group. This is also a subtle
|
|
way to get the total number of channels when 'tag' is -1</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="groupOldest,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#groupOldest%2Ccint"><span class="Identifier">groupOldest</span></a><span class="Other">(</span><span class="Identifier">tag</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_GroupOldest"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Finds the "oldest" sample playing in a group of channels</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="groupNewer,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#groupNewer%2Ccint"><span class="Identifier">groupNewer</span></a><span class="Other">(</span><span class="Identifier">tag</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_GroupNewer"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Finds the "most recent" (i.e. last) sample playing in a group of channels</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="playChannelTimed,cint,ptr.Chunk,cint,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#playChannelTimed%2Ccint%2Cptr.Chunk%2Ccint%2Ccint"><span class="Identifier">playChannelTimed</span></a><span class="Other">(</span><span class="Identifier">channel</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">chunk</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_mixer.html#Chunk"><span class="Identifier">Chunk</span></a><span class="Other">;</span> <span class="Identifier">loops</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">ticks</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
|
|
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_PlayChannelTimed"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>The same as above, but the sound is played at most 'ticks' milliseconds</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="playMusic,ptr.Music,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#playMusic%2Cptr.Music%2Ccint"><span class="Identifier">playMusic</span></a><span class="Other">(</span><span class="Identifier">music</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_mixer.html#Music"><span class="Identifier">Music</span></a><span class="Other">;</span> <span class="Identifier">loops</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_PlayMusic"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="fadeInMusic,ptr.Music,cint,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#fadeInMusic%2Cptr.Music%2Ccint%2Ccint"><span class="Identifier">fadeInMusic</span></a><span class="Other">(</span><span class="Identifier">music</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_mixer.html#Music"><span class="Identifier">Music</span></a><span class="Other">;</span> <span class="Identifier">loops</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">ms</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
|
|
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_FadeInMusic"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Fade in music or a channel over "ms" milliseconds, same semantics as the "Play" functions</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="fadeInMusicPos,ptr.Music,cint,cint,cdouble"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#fadeInMusicPos%2Cptr.Music%2Ccint%2Ccint%2Ccdouble"><span class="Identifier">fadeInMusicPos</span></a><span class="Other">(</span><span class="Identifier">music</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_mixer.html#Music"><span class="Identifier">Music</span></a><span class="Other">;</span> <span class="Identifier">loops</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">ms</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">position</span><span class="Other">:</span> <span class="Identifier">cdouble</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
|
|
<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_FadeInMusicPos"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="fadeInChannelTimed,cint,ptr.Chunk,cint,cint,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#fadeInChannelTimed%2Ccint%2Cptr.Chunk%2Ccint%2Ccint%2Ccint"><span class="Identifier">fadeInChannelTimed</span></a><span class="Other">(</span><span class="Identifier">channel</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">chunk</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_mixer.html#Chunk"><span class="Identifier">Chunk</span></a><span class="Other">;</span> <span class="Identifier">loops</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">ms</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span>
|
|
<span class="Identifier">ticks</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_FadeInChannelTimed"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="volume,cint,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#volume%2Ccint%2Ccint"><span class="Identifier">volume</span></a><span class="Other">(</span><span class="Identifier">channel</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">volume</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_Volume"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Set the volume in the range of 0-128 of a specific channel or chunk.
|
|
If the specified channel is -1, set volume for all channels.
|
|
Returns the original volume.
|
|
If the specified volume is -1, just return the current volume.</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="volumeChunk,ptr.Chunk,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#volumeChunk%2Cptr.Chunk%2Ccint"><span class="Identifier">volumeChunk</span></a><span class="Other">(</span><span class="Identifier">chunk</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_mixer.html#Chunk"><span class="Identifier">Chunk</span></a><span class="Other">;</span> <span class="Identifier">volume</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_VolumeChunk"</span><span class="Other">,</span>
|
|
<span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="volumeMusic,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#volumeMusic%2Ccint"><span class="Identifier">volumeMusic</span></a><span class="Other">(</span><span class="Identifier">volume</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_VolumeMusic"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="haltChannel,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#haltChannel%2Ccint"><span class="Identifier">haltChannel</span></a><span class="Other">(</span><span class="Identifier">channel</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_HaltChannel"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Halt playing of a particular channel</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="haltGroup,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#haltGroup%2Ccint"><span class="Identifier">haltGroup</span></a><span class="Other">(</span><span class="Identifier">tag</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_HaltGroup"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="haltMusic"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#haltMusic"><span class="Identifier">haltMusic</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_HaltMusic"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="expireChannel,cint,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#expireChannel%2Ccint%2Ccint"><span class="Identifier">expireChannel</span></a><span class="Other">(</span><span class="Identifier">channel</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">ticks</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_ExpireChannel"</span><span class="Other">,</span>
|
|
<span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Change the expiration delay for a particular channel.
|
|
The sample will stop playing after the 'ticks' milliseconds have elapsed,
|
|
or remove the expiration if 'ticks' is -1</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="fadeOutChannel,cint,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#fadeOutChannel%2Ccint%2Ccint"><span class="Identifier">fadeOutChannel</span></a><span class="Other">(</span><span class="Identifier">which</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">ms</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_FadeOutChannel"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Halt a channel, fading it out progressively till it's silent
|
|
The ms parameter indicates the number of milliseconds the fading
|
|
will take.</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="fadeOutGroup,cint,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#fadeOutGroup%2Ccint%2Ccint"><span class="Identifier">fadeOutGroup</span></a><span class="Other">(</span><span class="Identifier">tag</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">;</span> <span class="Identifier">ms</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_FadeOutGroup"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="fadeOutMusic,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#fadeOutMusic%2Ccint"><span class="Identifier">fadeOutMusic</span></a><span class="Other">(</span><span class="Identifier">ms</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_FadeOutMusic"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="fadingMusic"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#fadingMusic"><span class="Identifier">fadingMusic</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="sdl2_mixer.html#Fading"><span class="Identifier">Fading</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_FadingMusic"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Query the fading status of a channel</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="fadingChannel,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#fadingChannel%2Ccint"><span class="Identifier">fadingChannel</span></a><span class="Other">(</span><span class="Identifier">which</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <a href="sdl2_mixer.html#Fading"><span class="Identifier">Fading</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_FadingChannel"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="pause,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#pause%2Ccint"><span class="Identifier">pause</span></a><span class="Other">(</span><span class="Identifier">channel</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_Pause"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Pause/Resume a particular channel</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="resume,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#resume%2Ccint"><span class="Identifier">resume</span></a><span class="Other">(</span><span class="Identifier">channel</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_Resume"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="paused,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#paused%2Ccint"><span class="Identifier">paused</span></a><span class="Other">(</span><span class="Identifier">channel</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_Paused"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="pauseMusic"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#pauseMusic"><span class="Identifier">pauseMusic</span></a><span class="Other">(</span><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_PauseMusic"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Pause/Resume the music stream</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="resumeMusic"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#resumeMusic"><span class="Identifier">resumeMusic</span></a><span class="Other">(</span><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_ResumeMusic"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="rewindMusic"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#rewindMusic"><span class="Identifier">rewindMusic</span></a><span class="Other">(</span><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_RewindMusic"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="pausedMusic"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#pausedMusic"><span class="Identifier">pausedMusic</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_PausedMusic"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="setMusicPosition,cdouble"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#setMusicPosition%2Ccdouble"><span class="Identifier">setMusicPosition</span></a><span class="Other">(</span><span class="Identifier">position</span><span class="Other">:</span> <span class="Identifier">cdouble</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_SetMusicPosition"</span><span class="Other">,</span>
|
|
<span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Set the current position in the music stream.
|
|
This returns 0 if successful, or -1 if it failed or isn't implemented.
|
|
This function is only implemented for MOD music formats (set pattern
|
|
order number) and for OGG, FLAC, MP3_MAD, MP3_MPG and MODPLUG music
|
|
(set position in seconds), at the moment.</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="playing,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#playing%2Ccint"><span class="Identifier">playing</span></a><span class="Other">(</span><span class="Identifier">channel</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_Playing"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Check the status of a specific channel.
|
|
If the specified channel is -1, check all channels.</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="playingMusic"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#playingMusic"><span class="Identifier">playingMusic</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_PlayingMusic"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="setMusicCMD,cstring"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#setMusicCMD%2Ccstring"><span class="Identifier">setMusicCMD</span></a><span class="Other">(</span><span class="Identifier">command</span><span class="Other">:</span> <span class="Identifier">cstring</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_SetMusicCMD"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Stop music and set external music playback command</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="setSynchroValue,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#setSynchroValue%2Ccint"><span class="Identifier">setSynchroValue</span></a><span class="Other">(</span><span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_SetSynchroValue"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Synchro value is set by MikMod from modules while playing</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="getSynchroValue"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#getSynchroValue"><span class="Identifier">getSynchroValue</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_GetSynchroValue"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="setSoundFonts,cstring"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#setSoundFonts%2Ccstring"><span class="Identifier">setSoundFonts</span></a><span class="Other">(</span><span class="Identifier">paths</span><span class="Other">:</span> <span class="Identifier">cstring</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_SetSoundFonts"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Set/Get/Iterate SoundFonts paths to use by supported MIDI backends</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="getSoundFonts"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#getSoundFonts"><span class="Identifier">getSoundFonts</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cstring</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_GetSoundFonts"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="eachSoundFont,proc(cstring,pointer),pointer"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#eachSoundFont%2Cproc%28cstring%2Cpointer%29%2Cpointer"><span class="Identifier">eachSoundFont</span></a><span class="Other">(</span><span class="Identifier">function</span><span class="Other">:</span> <span class="Keyword">proc</span> <span class="Other">(</span><span class="Identifier">a1</span><span class="Other">:</span> <span class="Identifier">cstring</span><span class="Other">;</span> <span class="Identifier">a2</span><span class="Other">:</span> <span class="Identifier">pointer</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">cdecl</span></span><span class="Other">.}</span></span><span class="Other">;</span>
|
|
<span class="Identifier">data</span><span class="Other">:</span> <span class="Identifier">pointer</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_EachSoundFont"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
<a id="getChunk,cint"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#getChunk%2Ccint"><span class="Identifier">getChunk</span></a><span class="Other">(</span><span class="Identifier">channel</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="sdl2_mixer.html#Chunk"><span class="Identifier">Chunk</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_GetChunk"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Get the Mix_Chunk currently associated with a mixer channel
|
|
Returns NULL if it's an invalid channel, or there's no chunk associated.</pre>
|
|
|
|
|
|
</dd>
|
|
<a id="closeAudio"></a>
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#closeAudio"><span class="Identifier">closeAudio</span></a><span class="Other">(</span><span class="Other">)</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"Mix_CloseAudio"</span><span class="Other">,</span> <span class="Identifier">cdecl</span></span><span class="Other">.}</span></span></pre></dt>
|
|
<dd>
|
|
|
|
<pre>Close the mixer, halting all playing audio</pre>
|
|
|
|
|
|
</dd>
|
|
|
|
</dl></div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="twelve-columns footer">
|
|
<span class="nim-sprite"></span>
|
|
<br/>
|
|
<small style="color: var(--hint);">Made with Nim. Generated: 2020-04-26 21:10:29 UTC</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|