# _I_chActive
_I_chActiveStores the i ch active collection used by the i sound subsystem.
src/i_sound.mlMixes Doom sound effects into platform PCM buffers and translates MUS music events to the active MIDI backend.
doomdef.ml → src/doomdef.mldoomdef.ml → src/doomdef.mldoomstat.ml → src/doomstat.mli_sound.ml → src/i_sound.mli_system.ml → src/i_system.mlm_argv.ml → src/m_argv.mlm_misc.ml → src/m_misc.mlsounds.ml → src/sounds.mlstd/math.ml → ../MiniLangCompilerOptimization/MiniLangCompilerPy/std/math.ml external dependencyw_wad.ml → src/w_wad.mlz_zone.ml → src/z_zone.ml_I_chActiveStores the i ch active collection used by the i sound subsystem.
_I_chDataStores the i ch data collection used by the i sound subsystem.
_I_chFracStores the i ch frac collection used by the i sound subsystem.
_I_chHandleStores the i ch handle collection used by the i sound subsystem.
_I_chIdStores the i ch id collection used by the i sound subsystem.
_I_chLeftVolStores the i ch left vol collection used by the i sound subsystem.
_I_chLenStores the i ch len collection used by the i sound subsystem.
_I_chPosStores the i ch pos collection used by the i sound subsystem.
_I_chRightVolStores the i ch right vol collection used by the i sound subsystem.
_I_chStartStores the i ch start collection used by the i sound subsystem.
_I_chStepStores the i ch step collection used by the i sound subsystem.
_I_currentSongHandleTracks the mutable i current song handle value used by the i sound subsystem.
_I_midiDbgPrintedTracks whether i midi dbg printed is active in the i sound subsystem.
_I_midiHandleTracks the mutable i midi handle value used by the i sound subsystem.
_I_mixScaleTableStores the i mix scale table collection used by the i sound subsystem.
_I_mixScratchTracks the mutable i mix scratch value used by the i sound subsystem.
_I_musicChanMapStores the i music chan map collection used by the i sound subsystem.
_I_musicChanVelStores the i music chan vel collection used by the i sound subsystem.
_I_musicDataHolds the optional i music data resource used by the i sound subsystem.
_I_musicDelayTracks the mutable i music delay value used by the i sound subsystem.
_I_musicLastMsTracks the mutable i music last ms value used by the i sound subsystem.
_I_musicLoopingTracks whether i music looping is active in the i sound subsystem.
_I_musicMsFracTracks the mutable i music ms frac value used by the i sound subsystem.
_I_musicPausedTracks whether i music paused is active in the i sound subsystem.
_I_musicPlayingTracks whether i music playing is active in the i sound subsystem.
_I_musicPosTracks the mutable i music pos value used by the i sound subsystem.
_I_musicScoreEndTracks the mutable i music score end value used by the i sound subsystem.
_I_musicScoreStartTracks the mutable i music score start value used by the i sound subsystem.
_I_musicUsedMidiStores the i music used midi collection used by the i sound subsystem.
_I_musicVolumeTracks the mutable i music volume value used by the i sound subsystem.
_I_nextHandleTracks the mutable i next handle value used by the i sound subsystem.
_I_nextSongHandleTracks the mutable i next song handle value used by the i sound subsystem.
_I_sfxRatesStores the i sfx rates collection used by the i sound subsystem.
_I_sfxSamplesStores the i sfx samples collection used by the i sound subsystem.
_I_sfxVolumeTracks the mutable i sfx volume value used by the i sound subsystem.
_I_songDataStores the i song data collection used by the i sound subsystem.
_I_soundTimerEnabledTracks whether i sound timer enabled is active in the i sound subsystem.
_I_stepTableStores the i step table collection used by the i sound subsystem.
_I_wavebuf_t struct
_I_waveBuffersStores the i wave buffers collection used by the i sound subsystem.
_I_waveHandleTracks the mutable i wave handle value used by the i sound subsystem.
_I_waveReadyTracks whether i wave ready is active in the i sound subsystem.
inline function _IS_CalcStereoVolumes(vol127, sep)Applies Doom's quadratic separation curve and returns clamped left/right 0..127 channel gains.
| Parameter | Type | Default | Description |
|---|---|---|---|
vol127 | dynamic | — | Vol127 value supplied to `_IS_CalcStereoVolumes`. |
sep | dynamic | — | Sep value supplied to `_IS_CalcStereoVolumes`. |
inline function _IS_Clamp(v, lo, hi)Converts and clamps a scalar to an inclusive mixer/MIDI range.
| Parameter | Type | Default | Description |
|---|---|---|---|
v | dynamic | — | Value consumed by the operation. |
lo | dynamic | — | Inclusive lower bound. |
hi | dynamic | — | Inclusive upper bound. |
inline function _IS_ClampS16(v)Saturates a mixed accumulator to the signed 16-bit PCM sample range.
| Parameter | Type | Default | Description |
|---|---|---|---|
v | dynamic | — | Value consumed by the operation. |
function _IS_EnsureSfxCacheSize()Resizes per-SFX rate/sample/length caches to the metadata table while preserving existing entries.
inline function _IS_EnumIndex(v, fallback)Converts enum-compatible integer values without accepting fractional numbers.
| Parameter | Type | Default | Description |
|---|---|---|---|
v | dynamic | — | Value consumed by the operation. |
fallback | dynamic | — | Value returned when the requested conversion or lookup is unavailable. |
inline function _IS_FindChannelByHandle(handle)Resolves a public sound handle to its active software channel index, or minus one when stale.
| Parameter | Type | Default | Description |
|---|---|---|---|
handle | dynamic | — | Handle value supplied to `_IS_FindChannelByHandle`. |
function _IS_FindChannelForNewSound(sid)Reuses a free mixing channel, otherwise evicting the oldest after enforcing single-instance effects.
| Parameter | Type | Default | Description |
|---|---|---|---|
sid | dynamic | — | Sid value supplied to `_IS_FindChannelForNewSound`. |
const _IS_GMEM_FIXED = 0Defines is gmem fixed for the i sound subsystem.
inline function _IS_InitMixScaleTable()Precomputes exact 8-bit sample scaling so the mixer can avoid per-sample division.
inline function _IS_InitStepTable()Precomputes 16.16 pitch steps for every signed Doom pitch offset.
inline function _IS_IsSeq(v)Accepts either array or list storage used by translated audio tables.
| Parameter | Type | Default | Description |
|---|---|---|---|
v | dynamic | — | Value consumed by the operation. |
function _IS_LoadSfxData(sid)Decodes and caches a DMX sound lump's sample rate and unsigned 8-bit PCM payload by SFX id.
| Parameter | Type | Default | Description |
|---|---|---|---|
sid | dynamic | — | Sid value supplied to `_IS_LoadSfxData`. |
function _IS_MapMusChannel(mchan)Assigns a stable non-percussion MIDI channel to a MUS channel, with MUS channel 15 mapped to percussion.
| Parameter | Type | Default | Description |
|---|---|---|---|
mchan | dynamic | — | Mchan value supplied to `_IS_MapMusChannel`. |
const _IS_MIDI_MAPPER = 4294967295Defines is midi mapper for the i sound subsystem.
inline function _IS_MidiAllNotesOff()Sends both all-notes-off and all-sound-off controllers on every MIDI channel.
inline function _IS_MidiInit()Opens the platform MIDI backend once and stores its pointer-sized output handle.
inline function _IS_MidiMsg2(status, data1)Packs and sends a two-byte MIDI message, reporting only the first failure in developer mode.
| Parameter | Type | Default | Description |
|---|---|---|---|
status | dynamic | — | Status value supplied to `_IS_MidiMsg2`. |
data1 | dynamic | — | Data1 value supplied to `_IS_MidiMsg2`. |
inline function _IS_MidiMsg3(status, data1, data2)Packs and sends a three-byte MIDI message, reporting only the first failure in developer mode.
| Parameter | Type | Default | Description |
|---|---|---|---|
status | dynamic | — | Status value supplied to `_IS_MidiMsg3`. |
data1 | dynamic | — | Data1 value supplied to `_IS_MidiMsg3`. |
data2 | dynamic | — | Data2 value supplied to `_IS_MidiMsg3`. |
inline function _IS_MidiShutdown()Resets all MIDI voices, closes the mapper handle, and clears local ownership.
const _IS_MIX_BUF_BYTES = _IS_MIX_SAMPLES * 4Defines is mix buf bytes for the i sound subsystem.
const _IS_MIX_RATE = 11025Defines is mix rate for the i sound subsystem.
const _IS_MIX_SAMPLES = 512Defines is mix samples for the i sound subsystem.
function _IS_MixToBytes(outb)Mixes active unsigned 8-bit SFX channels into an interleaved signed 16-bit stereo PCM block.
| Parameter | Type | Default | Description |
|---|---|---|---|
outb | dynamic | — | Outb value supplied to `_IS_MixToBytes`. |
inline function _IS_MusCtrlToMidi(ctrl)Maps Doom MUS controller numbers to their General MIDI controller equivalents.
| Parameter | Type | Default | Description |
|---|---|---|---|
ctrl | dynamic | — | Ctrl value supplied to `_IS_MusCtrlToMidi`. |
inline function _IS_MusicFindSlotIndex(handle)Resolves a registered song handle to its metadata slot, or minus one when unregistered.
| Parameter | Type | Default | Description |
|---|---|---|---|
handle | dynamic | — | Handle value supplied to `_IS_MusicFindSlotIndex`. |
function _IS_MusicProcessSlice()Translates MUS events into MIDI messages until a timed slice boundary or score end is reached.
function _IS_MusicResetRuntime()Resets MUS channel velocities/mappings, reserves MIDI percussion channel 10, and clears timing fractions.
inline function _IS_MusicRestart()Silences current notes and rewinds a looping MUS score to its first event with fresh channel mappings.
function _IS_MusicRunTicks(ticks)Consumes a bounded number of 140-Hz MUS ticks, honoring delays, looping, pause, and malformed-score guards.
| Parameter | Type | Default | Description |
|---|---|---|---|
ticks | dynamic | — | Ticks value supplied to `_IS_MusicRunTicks`. |
inline function _IS_MusicScale7(v)Applies sequencer-side master gain on Windows MIDI devices that may ignore midiOutSetVolume; Linux delegates gain to FluidSynth.
| Parameter | Type | Default | Description |
|---|---|---|---|
v | dynamic | — | Value consumed by the operation. |
inline function _IS_MusicSetSlotPlaying(handle, playing, looping)Updates the looping and playing flags stored with a registered song handle.
| Parameter | Type | Default | Description |
|---|---|---|---|
handle | dynamic | — | Handle value supplied to `_IS_MusicSetSlotPlaying`. |
playing | dynamic | — | Playing value supplied to `_IS_MusicSetSlotPlaying`. |
looping | dynamic | — | Looping value supplied to `_IS_MusicSetSlotPlaying`. |
function _IS_MusicStartInternal(handle, data, looping)Validates a MUS score header/range and initializes decoder, timing, loop, and registration state for playback.
| Parameter | Type | Default | Description |
|---|---|---|---|
handle | dynamic | — | Handle value supplied to `_IS_MusicStartInternal`. |
data | dynamic | — | Binary or structured data to process. |
looping | dynamic | — | Looping value supplied to `_IS_MusicStartInternal`. |
function _IS_MusicStopInternal(updateSlot)Silences MIDI, clears the active MUS decoder/timing state, and optionally marks its song slot stopped.
| Parameter | Type | Default | Description |
|---|---|---|---|
updateSlot | dynamic | — | Update slot value supplied to `_IS_MusicStopInternal`. |
function _IS_MusicTicker()Converts elapsed milliseconds to fractional 140-Hz MUS ticks and advances active playback with stall clamping.
inline function _IS_NormalizeVolume127(v)Converts legacy 0..15 Doom volume values to 0..127 while accepting already normalized MIDI-scale values.
| Parameter | Type | Default | Description |
|---|---|---|---|
v | dynamic | — | Value consumed by the operation. |
const _IS_NUM_MIX_CHANNELS = 8Defines the is num mix channels count used by the i sound subsystem.
const _IS_NUM_WAVE_BUFS = 4Defines the is num wave bufs count used by the i sound subsystem.
inline function _IS_PitchToStep(pitch, rate)Combines Doom pitch and source sample rate into a positive 16.16 mixer cursor step.
| Parameter | Type | Default | Description |
|---|---|---|---|
pitch | dynamic | — | Pitch value supplied to `_IS_PitchToStep`. |
rate | dynamic | — | Rate value supplied to `_IS_PitchToStep`. |
inline function _IS_ReadMusVarLen(data, posref)Decodes a bounded MUS base-128 variable-length delay and advances the caller's byte cursor.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Binary or structured data to process. |
posref | dynamic | — | Posref value supplied to `_IS_ReadMusVarLen`. |
inline function _IS_ReadU16(buf, off)Reads a checked unsigned little-endian 16-bit field, returning zero outside the buffer.
| Parameter | Type | Default | Description |
|---|---|---|---|
buf | dynamic | — | Buf value supplied to `_IS_ReadU16`. |
off | dynamic | — | Zero-based byte or element offset. |
inline function _IS_ReadU32(buf, off)Reads a checked unsigned little-endian 32-bit field, returning zero outside the buffer.
| Parameter | Type | Default | Description |
|---|---|---|---|
buf | dynamic | — | Buf value supplied to `_IS_ReadU32`. |
off | dynamic | — | Zero-based byte or element offset. |
inline function _IS_ReadU64(buf, off)Reconstructs a pointer-sized little-endian value from two checked 32-bit words.
| Parameter | Type | Default | Description |
|---|---|---|---|
buf | dynamic | — | Buf value supplied to `_IS_ReadU64`. |
off | dynamic | — | Zero-based byte or element offset. |
function _IS_ResetChannels()Reinitializes every software mixing channel to an inactive, centered, empty state.
inline function _IS_SetChannelVolumes(slot, vol, sep)Stores Doom's separation-adjusted left/right gains for one checked software mixing channel.
| Parameter | Type | Default | Description |
|---|---|---|---|
slot | dynamic | — | Slot value supplied to `_IS_SetChannelVolumes`. |
vol | dynamic | — | Vol value supplied to `_IS_SetChannelVolumes`. |
sep | dynamic | — | Sep value supplied to `_IS_SetChannelVolumes`. |
inline function _IS_ShouldSingleInstance(sid)Identifies chainsaw, platform-move, and pistol effects that replace an existing identical channel.
| Parameter | Type | Default | Description |
|---|---|---|---|
sid | dynamic | — | Sid value supplied to `_IS_ShouldSingleInstance`. |
inline function _IS_StopAllSfx()Marks every software SFX channel inactive without disturbing music playback.
inline function _IS_TickMs()Returns the platform millisecond clock used to schedule MUS playback.
inline function _IS_ToInt(v, fallback)Converts numeric or numeric-string values by truncating toward zero, otherwise returning the supplied fallback.
| Parameter | Type | Default | Description |
|---|---|---|---|
v | dynamic | — | Value consumed by the operation. |
fallback | dynamic | — | Value returned when the requested conversion or lookup is unavailable. |
const _IS_WAVE_MAPPER = 4294967295Defines is wave mapper for the i sound subsystem.
inline function _IS_WaveFindFreeBuffer()Returns the first waveform ring slot not currently owned by WinMM, or minus one when saturated.
inline function _IS_WaveFormat()Builds the PCM WAVEFORMATEX for 11,025-Hz stereo signed 16-bit mixer output.
const _IS_WAVEHDR_SIZE = 48Defines is wavehdr size for the i sound subsystem.
function _IS_WaveInit()Opens WinMM waveform output and allocates/prepares the fixed ring of unmanaged PCM buffers.
inline function _IS_WaveIsDone(wb)Reads a submitted WAVEHDR's WHDR_DONE flag, treating never-submitted buffers as immediately reusable.
| Parameter | Type | Default | Description |
|---|---|---|---|
wb | dynamic | — | Wb value supplied to `_IS_WaveIsDone`. |
inline function _IS_WaveRefresh()Marks submitted ring buffers reusable after WinMM reports their headers complete.
function _IS_WaveShutdown()Resets waveform output, unprepares every header, frees unmanaged buffers, and closes the device.
function _IS_WaveSubmitMixedBuffer()Fills one free unmanaged waveform buffer with a mixed block and queues its prepared header to WinMM.
const _IS_WHDR_DONE = 1Defines is whdr done for the i sound subsystem.
inline function _IS_WriteU16(buf, off, value)Writes one non-negative unsigned 16-bit value in little-endian order to a WinMM structure buffer.
| Parameter | Type | Default | Description |
|---|---|---|---|
buf | dynamic | — | Buf value supplied to `_IS_WriteU16`. |
off | dynamic | — | Zero-based byte or element offset. |
value | dynamic | — | Value consumed by the operation. |
inline function _IS_WriteU32(buf, off, value)Writes one non-negative unsigned 32-bit value in little-endian order to a WinMM structure buffer.
| Parameter | Type | Default | Description |
|---|---|---|---|
buf | dynamic | — | Buf value supplied to `_IS_WriteU32`. |
off | dynamic | — | Zero-based byte or element offset. |
value | dynamic | — | Value consumed by the operation. |
inline function _IS_WriteU64(buf, off, value)Writes a pointer-sized 64-bit value as two little-endian words in a WinMM structure buffer.
| Parameter | Type | Default | Description |
|---|---|---|---|
buf | dynamic | — | Buf value supplied to `_IS_WriteU64`. |
off | dynamic | — | Zero-based byte or element offset. |
value | dynamic | — | Value consumed by the operation. |
inline function _ISnd_IDiv(a, b)Divides mixer integers with truncation toward zero and returns zero for a zero divisor.
| Parameter | Type | Default | Description |
|---|---|---|---|
a | dynamic | — | First input operand. |
b | dynamic | — | Second input operand. |
function addsfx(sfxid, volume, step, seperation)Assigns cached PCM to a mixing channel, initializes cursor/gains, and returns a unique playback handle.
| Parameter | Type | Default | Description |
|---|---|---|---|
sfxid | dynamic | — | Sfxid value supplied to `addsfx`. |
volume | dynamic | — | Volume value supplied to `addsfx`. |
step | dynamic | — | Step value supplied to `addsfx`. |
seperation | dynamic | — | Seperation value supplied to `addsfx`. |
function getsfx(name, lenOut)Loads a named `DS*` sound lump and writes its byte length through the legacy output reference.
| Parameter | Type | Default | Description |
|---|---|---|---|
name | dynamic | — | Resource or object name to resolve. |
lenOut | dynamic | — | Len out value supplied to `getsfx`. |
extern function GlobalAlloc(flags as u32, size as u32) from "kernel32.dll" symbol "GlobalAlloc" returns ptrAllocates fixed-address unmanaged storage for WinMM sample buffers and WAVEHDR records.
| Parameter | Type | Default | Description |
|---|---|---|---|
flags | u32 | — | Bit flags that control the operation. |
size | u32 | — | Requested size in bytes or elements. |
Returns: The resulting fixed-address unmanaged storage for WinMM sample buffers and WAVEHDR records.
extern function GlobalFree(mem as ptr) from "kernel32.dll" symbol "GlobalFree" returns ptrReleases unmanaged WinMM buffer/header storage and returns null on success.
| Parameter | Type | Default | Description |
|---|---|---|---|
mem | ptr | — | `ptr` value supplied as mem to `GlobalFree`. |
Returns: Result returned by the native `GlobalFree` binding as `ptr`.
function I_GetSfxLumpNum(sfxinfo)Resolves an SFX metadata name to its `DS*` lump, falling back to the pistol sound when absent.
| Parameter | Type | Default | Description |
|---|---|---|---|
sfxinfo | dynamic | — | Sfxinfo value supplied to `I_GetSfxLumpNum`. |
function I_HandleSoundTimer()Preserves the legacy timer callback hook; WinMM/MUS advancement is driven by the main update loop.
function I_InitMusic()Clears song registration/playback state, opens MIDI output, and applies the default master volume.
function I_InitSound()Initializes SFX caches/tables/channels, opens waveform output, and starts the MIDI music backend.
function I_PauseSong(handle)Pauses the active registered song, resets sounding MIDI notes, and updates its slot flags.
| Parameter | Type | Default | Description |
|---|---|---|---|
handle | dynamic | — | Handle value supplied to `I_PauseSong`. |
function I_PlaySong(handle, looping)Resolves a registered song, validates/starts its MUS stream, and records requested looping state.
| Parameter | Type | Default | Description |
|---|---|---|---|
handle | dynamic | — | Handle value supplied to `I_PlaySong`. |
looping | dynamic | — | Looping value supplied to `I_PlaySong`. |
function I_PrecacheSfx(id)Decodes one SFX id into the rate/sample cache before first playback.
| Parameter | Type | Default | Description |
|---|---|---|---|
id | dynamic | — | Id value supplied to `I_PrecacheSfx`. |
function I_QrySongPlaying(handle)Reports whether the requested handle is the active, unpaused MUS song.
| Parameter | Type | Default | Description |
|---|---|---|---|
handle | dynamic | — | Handle value supplied to `I_QrySongPlaying`. |
function I_RegisterSong(data)Stores immutable MUS bytes under a new handle with initial stopped/non-looping metadata.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Binary or structured data to process. |
function I_ResumeSong(handle)Resumes the active paused song from its MUS cursor with a rebased wall-clock timestamp.
| Parameter | Type | Default | Description |
|---|---|---|---|
handle | dynamic | — | Handle value supplied to `I_ResumeSong`. |
function I_SetChannels()Rebuilds the pitch table if needed and resets all software mixing channels.
function I_SetMusicVolume(volume)Normalizes Doom music volume and applies it to both WinMM MIDI output channels.
| Parameter | Type | Default | Description |
|---|---|---|---|
volume | dynamic | — | Volume value supplied to `I_SetMusicVolume`. |
function I_SetSfxVolume(volume)Normalizes and stores the master SFX gain used when starting/mixing effects.
| Parameter | Type | Default | Description |
|---|---|---|---|
volume | dynamic | — | Volume value supplied to `I_SetSfxVolume`. |
function I_ShutdownMusic()Stops the active MUS score and resets/closes the platform MIDI backend.
function I_ShutdownSound()Stops SFX, releases waveform buffers/device state, and shuts down registered MIDI music.
function I_SoundDelTimer()Clears the legacy sound-timer enabled flag during backend teardown.
function I_SoundIsPlaying(handle)Reports whether a sound handle still owns an active channel with unread PCM samples.
| Parameter | Type | Default | Description |
|---|---|---|---|
handle | dynamic | — | Handle value supplied to `I_SoundIsPlaying`. |
function I_SoundSetTimer(ticks)Marks the legacy sound timer enabled while ignoring its obsolete tick-period argument.
| Parameter | Type | Default | Description |
|---|---|---|---|
ticks | dynamic | — | Ticks value supplied to `I_SoundSetTimer`. |
function I_StartSound(id, vol, sep, pitch, priority)Loads an SFX, derives its pitch step, assigns a mixing channel, and returns a public playback handle.
| Parameter | Type | Default | Description |
|---|---|---|---|
id | dynamic | — | Id value supplied to `I_StartSound`. |
vol | dynamic | — | Vol value supplied to `I_StartSound`. |
sep | dynamic | — | Sep value supplied to `I_StartSound`. |
pitch | dynamic | — | Pitch value supplied to `I_StartSound`. |
priority | dynamic | — | Playback or task priority used by the operation. |
function I_StopSong(handle)Stops the active song decoder or clears only the metadata flags of a different registered handle.
| Parameter | Type | Default | Description |
|---|---|---|---|
handle | dynamic | — | Handle value supplied to `I_StopSong`. |
function I_StopSound(handle)Deactivates the software mixing channel associated with a public sound handle.
| Parameter | Type | Default | Description |
|---|---|---|---|
handle | dynamic | — | Handle value supplied to `I_StopSound`. |
function I_SubmitSound()Fills every currently free WinMM ring slot with a freshly mixed PCM block.
function I_UnRegisterSong(handle)Stops a matching active song and removes its handle/data record from the registration table.
| Parameter | Type | Default | Description |
|---|---|---|---|
handle | dynamic | — | Handle value supplied to `I_UnRegisterSong`. |
function I_UpdateSound()Advances wall-clock-driven MUS/MIDI playback during the engine sound update.
function I_UpdateSoundParams(handle, vol, sep, pitch)Recomputes pitch step and stereo gains for an active sound handle.
| Parameter | Type | Default | Description |
|---|---|---|---|
handle | dynamic | — | Handle value supplied to `I_UpdateSoundParams`. |
vol | dynamic | — | Vol value supplied to `I_UpdateSoundParams`. |
sep | dynamic | — | Sep value supplied to `I_UpdateSoundParams`. |
pitch | dynamic | — | Pitch value supplied to `I_UpdateSoundParams`. |
lengthsStores the lengths collection used by the i sound subsystem.
extern function midiOutClose(hmo as ptr) from "winmm.dll" symbol "midiOutClose" returns u32Closes the Windows MIDI output handle after playback has stopped.
| Parameter | Type | Default | Description |
|---|---|---|---|
hmo | ptr | — | `ptr` value supplied as hmo to `midiOutClose`. |
Returns: Result returned by the native `midiOutClose` binding as `u32`.
extern function midiOutOpen(phmo as bytes, dev as u32, cb as ptr, inst as ptr, flags as u32) from "winmm.dll" symbol "midiOutOpen" returns u32Opens the Windows MIDI mapper and writes its output handle to caller-owned storage.
| Parameter | Type | Default | Description |
|---|---|---|---|
phmo | bytes | — | `bytes` value supplied as phmo to `midiOutOpen`. |
dev | u32 | — | `u32` value supplied as dev to `midiOutOpen`. |
cb | ptr | — | `ptr` value supplied as cb to `midiOutOpen`. |
inst | ptr | — | `ptr` value supplied as inst to `midiOutOpen`. |
flags | u32 | — | Bit flags that control the operation. |
Returns: Result returned by the native `midiOutOpen` binding as `u32`.
extern function midiOutReset(hmo as ptr) from "winmm.dll" symbol "midiOutReset" returns u32Silences and resets every channel on the active Windows MIDI output device.
| Parameter | Type | Default | Description |
|---|---|---|---|
hmo | ptr | — | `ptr` value supplied as hmo to `midiOutReset`. |
Returns: Result returned by the native `midiOutReset` binding as `u32`.
extern function midiOutSetVolume(hmo as ptr, vol as u32) from "winmm.dll" symbol "midiOutSetVolume" returns u32Applies a packed left/right 16-bit master volume to the MIDI output device.
| Parameter | Type | Default | Description |
|---|---|---|---|
hmo | ptr | — | `ptr` value supplied as hmo to `midiOutSetVolume`. |
vol | u32 | — | `u32` value supplied as vol to `midiOutSetVolume`. |
Returns: Result returned by the native `midiOutSetVolume` binding as `u32`.
extern function midiOutShortMsg(hmo as ptr, msg as u32) from "winmm.dll" symbol "midiOutShortMsg" returns u32Sends one packed channel/system MIDI message to the active output device.
| Parameter | Type | Default | Description |
|---|---|---|---|
hmo | ptr | — | `ptr` value supplied as hmo to `midiOutShortMsg`. |
msg | u32 | — | `u32` value supplied as msg to `midiOutShortMsg`. |
Returns: Result returned by the native `midiOutShortMsg` binding as `u32`.
function myioctl(fd, req, arg)Retains the legacy Unix audio-control entry point as a deterministic no-op on WinMM.
| Parameter | Type | Default | Description |
|---|---|---|---|
fd | dynamic | — | Fd value supplied to `myioctl`. |
req | dynamic | — | Req value supplied to `myioctl`. |
arg | dynamic | — | Arg value supplied to `myioctl`. |
extern function RtlMoveMemoryFromPtr(dst as bytes, src as ptr, len as u32) from "kernel32.dll" symbol "RtlMoveMemory" returns voidCopies an unmanaged WAVEHDR record into managed bytes for flag inspection.
| Parameter | Type | Default | Description |
|---|---|---|---|
dst | bytes | — | `bytes` value supplied as dst to `RtlMoveMemoryFromPtr`. |
src | ptr | — | `ptr` value supplied as src to `RtlMoveMemoryFromPtr`. |
len | u32 | — | `u32` value supplied as len to `RtlMoveMemoryFromPtr`. |
extern function RtlMoveMemoryToPtr(dst as ptr, src as bytes, len as u32) from "kernel32.dll" symbol "RtlMoveMemory" returns voidCopies a managed byte buffer into fixed unmanaged WinMM storage.
| Parameter | Type | Default | Description |
|---|---|---|---|
dst | ptr | — | `ptr` value supplied as dst to `RtlMoveMemoryToPtr`. |
src | bytes | — | `bytes` value supplied as src to `RtlMoveMemoryToPtr`. |
len | u32 | — | `u32` value supplied as len to `RtlMoveMemoryToPtr`. |
extern function waveOutClose(hwo as ptr) from "winmm.dll" symbol "waveOutClose" returns u32Closes a reset waveform output handle after all headers have been unprepared.
| Parameter | Type | Default | Description |
|---|---|---|---|
hwo | ptr | — | `ptr` value supplied as hwo to `waveOutClose`. |
Returns: Result returned by the native `waveOutClose` binding as `u32`.
extern function waveOutOpen(phwo as bytes, dev as u32, pwfx as bytes, cb as ptr, inst as ptr, flags as u32) from "winmm.dll" symbol "waveOutOpen" returns u32Opens the WinMM waveform mapper with the supplied PCM format and writes the device handle to caller storage.
| Parameter | Type | Default | Description |
|---|---|---|---|
phwo | bytes | — | `bytes` value supplied as phwo to `waveOutOpen`. |
dev | u32 | — | `u32` value supplied as dev to `waveOutOpen`. |
pwfx | bytes | — | Native wave-format descriptor. |
cb | ptr | — | `ptr` value supplied as cb to `waveOutOpen`. |
inst | ptr | — | `ptr` value supplied as inst to `waveOutOpen`. |
flags | u32 | — | Bit flags that control the operation. |
Returns: Result returned by the native `waveOutOpen` binding as `u32`.
extern function waveOutPrepareHeader(hwo as ptr, pwh as ptr, cbwh as u32) from "winmm.dll" symbol "waveOutPrepareHeader" returns u32Registers one unmanaged WAVEHDR with an open waveform device before queued playback.
| Parameter | Type | Default | Description |
|---|---|---|---|
hwo | ptr | — | `ptr` value supplied as hwo to `waveOutPrepareHeader`. |
pwh | ptr | — | `ptr` value supplied as pwh to `waveOutPrepareHeader`. |
cbwh | u32 | — | `u32` value supplied as cbwh to `waveOutPrepareHeader`. |
Returns: Result returned by the native `waveOutPrepareHeader` binding as `u32`.
extern function waveOutReset(hwo as ptr) from "winmm.dll" symbol "waveOutReset" returns u32Stops waveform playback and returns all queued buffers to the application.
| Parameter | Type | Default | Description |
|---|---|---|---|
hwo | ptr | — | `ptr` value supplied as hwo to `waveOutReset`. |
Returns: Result returned by the native `waveOutReset` binding as `u32`.
extern function waveOutUnprepareHeader(hwo as ptr, pwh as ptr, cbwh as u32) from "winmm.dll" symbol "waveOutUnprepareHeader" returns u32Releases WinMM ownership of a completed WAVEHDR before its unmanaged memory is freed.
| Parameter | Type | Default | Description |
|---|---|---|---|
hwo | ptr | — | `ptr` value supplied as hwo to `waveOutUnprepareHeader`. |
pwh | ptr | — | `ptr` value supplied as pwh to `waveOutUnprepareHeader`. |
cbwh | u32 | — | `u32` value supplied as cbwh to `waveOutUnprepareHeader`. |
Returns: Result returned by the native `waveOutUnprepareHeader` binding as `u32`.
extern function waveOutWrite(hwo as ptr, pwh as ptr, cbwh as u32) from "winmm.dll" symbol "waveOutWrite" returns u32Queues a prepared WAVEHDR buffer for asynchronous playback on the waveform device.
| Parameter | Type | Default | Description |
|---|---|---|---|
hwo | ptr | — | `ptr` value supplied as hwo to `waveOutWrite`. |
pwh | ptr | — | `ptr` value supplied as pwh to `waveOutWrite`. |
cbwh | u32 | — | `u32` value supplied as cbwh to `waveOutWrite`. |
Returns: Result returned by the native `waveOutWrite` binding as `u32`.