MiniQuake

src/miniquake/sound/snd_dma.ml

Package
miniquake.sound.snd_dma
Reachable
No

Imports

Declarations

combineStaticChannels

function combineStaticChannels(system)

Implements the `combineStaticChannels` operation for `miniquake.sound.snd_dma` (combine static channels).

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `combineStaticChannels`.

View source

create

function create(filesystem, sampleRate)

Implements the `create` operation for `miniquake.sound.snd_dma` (create).

ParameterTypeDefaultDescription
filesystemdynamic—The filesystem input consumed by `create`.
sampleRatedynamic—The sample rate input consumed by `create`.

View source

DEFAULT_SOUND_PACKET_ATTENUATION

const DEFAULT_SOUND_PACKET_ATTENUATION = 1.

Defines the default sound packet attenuation value used by `miniquake.sound.snd_dma`.

View source

DEFAULT_SOUND_PACKET_VOLUME

const DEFAULT_SOUND_PACKET_VOLUME = 255

Defines the default sound packet volume value used by `miniquake.sound.snd_dma`.

View source

DYNAMIC_FIRST

const DYNAMIC_FIRST = NUM_AMBIENTS

Defines the dynamic first value used by `miniquake.sound.snd_dma`.

View source

GetSoundtime

function GetSoundtime(system, samplePosition)

Return soundtime.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `GetSoundtime`.
samplePositiondynamic—The sample position input consumed by `GetSoundtime`.

View source

hasArgument

function hasArgument(arguments, wanted)

Report whether argument.

ParameterTypeDefaultDescription
argumentsdynamic—Command-line arguments to inspect or execute.
wanteddynamic—The wanted input consumed by `hasArgument`.

View source

hasExtension

function hasExtension(name)

Report whether extension.

ParameterTypeDefaultDescription
namedynamic—Stable name that identifies the requested object or option.

View source

MAX_CHANNELS

const MAX_CHANNELS = 128

Defines the max channels value used by `miniquake.sound.snd_dma`.

View source

MAX_DYNAMIC_CHANNELS

const MAX_DYNAMIC_CHANNELS = 8

Defines the max dynamic channels value used by `miniquake.sound.snd_dma`.

View source

MAX_SFX

const MAX_SFX = 512

Defines the max sfx value used by `miniquake.sound.snd_dma`.

View source

nextRandom

function nextRandom(system)

Return next random for the active module state.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `nextRandom`.

View source

NUM_AMBIENTS

const NUM_AMBIENTS = 4

Defines the num ambients value used by `miniquake.sound.snd_dma`.

View source

S_AmbientOff

function S_AmbientOff(system)

Apply the Quake-compatible s ambient off behavior.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `S_AmbientOff`.

View source

S_AmbientOn

function S_AmbientOn(system)

Apply the Quake-compatible s ambient on behavior.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `S_AmbientOn`.

View source

S_BeginPrecaching

function S_BeginPrecaching(system)

Apply the Quake-compatible s begin precaching behavior.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `S_BeginPrecaching`.

View source

S_ClearBuffer

function S_ClearBuffer(system)

Apply the Quake-compatible s clear buffer behavior.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `S_ClearBuffer`.

View source

S_ClearPrecache

function S_ClearPrecache(system)

Apply the Quake-compatible s clear precache behavior.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `S_ClearPrecache`.

View source

S_EndPrecaching

function S_EndPrecaching(system)

Apply the Quake-compatible s end precaching behavior.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `S_EndPrecaching`.

View source

S_ExtraUpdate

function S_ExtraUpdate(system, samplePosition)

Apply the Quake-compatible s extra update behavior.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `S_ExtraUpdate`.
samplePositiondynamic—The sample position input consumed by `S_ExtraUpdate`.

View source

S_FindName

function S_FindName(system, name)

Apply the Quake-compatible s find name behavior.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `S_FindName`.
namedynamic—Stable name that identifies the requested object or option.

View source

S_Init

function S_Init(system, arguments, memorySize)

Apply the Quake-compatible s init behavior.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `S_Init`.
argumentsdynamic—Command-line arguments to inspect or execute.
memorySizedynamic—Size of the requested data or resource.

View source

S_InitPaintChannels

function S_InitPaintChannels(system)

Apply the Quake-compatible s init paint channels behavior.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `S_InitPaintChannels`.

View source

S_LocalSound

function S_LocalSound(system, sound)

Apply the Quake-compatible s local sound behavior.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `S_LocalSound`.
sounddynamic—The sound input consumed by `S_LocalSound`.

View source

S_Play

function S_Play(system, arguments)

Apply the Quake-compatible s play behavior.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `S_Play`.
argumentsdynamic—Command-line arguments to inspect or execute.

View source

S_PlayVol

function S_PlayVol(system, arguments)

Apply the Quake-compatible s play vol behavior.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `S_PlayVol`.
argumentsdynamic—Command-line arguments to inspect or execute.

View source

S_PrecacheSound

function S_PrecacheSound(system, name)

Apply the Quake-compatible s precache sound behavior.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `S_PrecacheSound`.
namedynamic—Stable name that identifies the requested object or option.

View source

S_Shutdown

function S_Shutdown(system)

Apply the Quake-compatible s shutdown behavior.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `S_Shutdown`.

View source

S_SoundInfo_f

function S_SoundInfo_f(system)

Apply the Quake-compatible s sound info f behavior.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `S_SoundInfo_f`.

View source

S_SoundList

function S_SoundList(system)

Apply the Quake-compatible s sound list behavior.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `S_SoundList`.

View source

S_StartSound

function S_StartSound(system, entityNumber, entityChannel, descriptor, origin, volume, attenuation)

Apply the Quake-compatible s start sound behavior.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `S_StartSound`.
entityNumberdynamic—The entity number input consumed by `S_StartSound`.
entityChanneldynamic—The entity channel input consumed by `S_StartSound`.
descriptordynamic—The descriptor input consumed by `S_StartSound`.
origindynamic—World-space origin of the operation.
volumedynamic—The volume input consumed by `S_StartSound`.
attenuationdynamic—The attenuation input consumed by `S_StartSound`.

View source

S_Startup

function S_Startup(system)

Apply the Quake-compatible s startup behavior.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `S_Startup`.

View source

S_StaticSound

function S_StaticSound(system, descriptor, origin, volume, attenuation)

Apply the Quake-compatible s static sound behavior.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `S_StaticSound`.
descriptordynamic—The descriptor input consumed by `S_StaticSound`.
origindynamic—World-space origin of the operation.
volumedynamic—The volume input consumed by `S_StaticSound`.
attenuationdynamic—The attenuation input consumed by `S_StaticSound`.

View source

S_StopAllSounds

function S_StopAllSounds(system, clear)

Apply the Quake-compatible s stop all sounds behavior.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `S_StopAllSounds`.
cleardynamic—The clear input consumed by `S_StopAllSounds`.

View source

S_StopAllSoundsC

function S_StopAllSoundsC(system)

Apply the Quake-compatible s stop all sounds c behavior.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `S_StopAllSoundsC`.

View source

S_StopSound

function S_StopSound(system, entityNumber, entityChannel)

Apply the Quake-compatible s stop sound behavior.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `S_StopSound`.
entityNumberdynamic—The entity number input consumed by `S_StopSound`.
entityChanneldynamic—The entity channel input consumed by `S_StopSound`.

View source

S_TouchSound

function S_TouchSound(system, name)

Apply the Quake-compatible s touch sound behavior.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `S_TouchSound`.
namedynamic—Stable name that identifies the requested object or option.

View source

S_Update

function S_Update(system, origin, forward, right, up, ambientLevels, frameTime, samplePosition)

Apply the Quake-compatible s update behavior.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `S_Update`.
origindynamic—World-space origin of the operation.
forwarddynamic—The forward input consumed by `S_Update`.
rightdynamic—The right input consumed by `S_Update`.
updynamic—The up input consumed by `S_Update`.
ambientLevelsdynamic—The ambient levels input consumed by `S_Update`.
frameTimedynamic—Time value used by the operation.
samplePositiondynamic—The sample position input consumed by `S_Update`.

View source

S_Update_

function S_Update_(system, samplePosition)

Apply the Quake-compatible s update behavior.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `S_Update_`.
samplePositiondynamic—The sample position input consumed by `S_Update_`.

View source

S_UpdateAmbientSounds

function S_UpdateAmbientSounds(system, ambientLevels, frameTime)

Apply the Quake-compatible s update ambient sounds behavior.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `S_UpdateAmbientSounds`.
ambientLevelsdynamic—The ambient levels input consumed by `S_UpdateAmbientSounds`.
frameTimedynamic—Time value used by the operation.

View source

SND_PickChannel

function SND_PickChannel(system, entityNumber, entityChannel)

Mirror Quake's SND_PickChannel routine and its observable state changes.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `SND_PickChannel`.
entityNumberdynamic—The entity number input consumed by `SND_PickChannel`.
entityChanneldynamic—The entity channel input consumed by `SND_PickChannel`.

View source

SND_Spatialize

function SND_Spatialize(system, channel)

Mirror Quake's SND_Spatialize routine and its observable state changes.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `SND_Spatialize`.
channeldynamic—The channel input consumed by `SND_Spatialize`.

View source

SNDDMA_GetDMAPos

inline function SNDDMA_GetDMAPos(system)

Mirror Quake's SNDDMA_GetDMAPos routine and its observable state changes.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `SNDDMA_GetDMAPos`.

View source

SNDDMA_Init

function SNDDMA_Init(system)

sound.h platform-facing API. The native DLL owns waveOut handles; the portable sound core only controls its lifetime and supplies PCM blocks.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `SNDDMA_Init`.

View source

SNDDMA_Shutdown

function SNDDMA_Shutdown(system)

Mirror Quake's SNDDMA_Shutdown routine and its observable state changes.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `SNDDMA_Shutdown`.

View source

SNDDMA_Submit

function SNDDMA_Submit(system)

Mirror Quake's SNDDMA_Submit routine and its observable state changes.

ParameterTypeDefaultDescription
systemdynamic—The system input consumed by `SNDDMA_Submit`.

View source

SOUND_NOMINAL_CLIP_DISTANCE

const SOUND_NOMINAL_CLIP_DISTANCE = 1000.

Defines the sound nominal clip distance value used by `miniquake.sound.snd_dma`.

View source

soundF32

function soundF32(value)

Implements the `soundF32` operation for `miniquake.sound.snd_dma` (sound f32).

ParameterTypeDefaultDescription
valuedynamic—Value consumed by `soundF32`.

View source

miniquake.sound.snd_dma.SoundSystem struct

STATIC_FIRST

const STATIC_FIRST = NUM_AMBIENTS + MAX_DYNAMIC_CHANNELS

Defines the static first value used by `miniquake.sound.snd_dma`.

View source