Files
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).
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `combineStaticChannels`. |
View source
# create
function create(filesystem, sampleRate)
Implements the `create` operation for `miniquake.sound.snd_dma` (create).
| Parameter | Type | Default | Description |
|---|
filesystem | dynamic | — | The filesystem input consumed by `create`. |
sampleRate | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `GetSoundtime`. |
samplePosition | dynamic | — | The sample position input consumed by `GetSoundtime`. |
View source
# hasArgument
function hasArgument(arguments, wanted)
Report whether argument.
| Parameter | Type | Default | Description |
|---|
arguments | dynamic | — | Command-line arguments to inspect or execute. |
wanted | dynamic | — | The wanted input consumed by `hasArgument`. |
View source
# hasExtension
function hasExtension(name)
Report whether extension.
| Parameter | Type | Default | Description |
|---|
name | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `S_AmbientOff`. |
View source
# S_AmbientOn
function S_AmbientOn(system)
Apply the Quake-compatible s ambient on behavior.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `S_AmbientOn`. |
View source
# S_BeginPrecaching
function S_BeginPrecaching(system)
Apply the Quake-compatible s begin precaching behavior.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `S_BeginPrecaching`. |
View source
# S_ClearBuffer
function S_ClearBuffer(system)
Apply the Quake-compatible s clear buffer behavior.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `S_ClearBuffer`. |
View source
# S_ClearPrecache
function S_ClearPrecache(system)
Apply the Quake-compatible s clear precache behavior.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `S_ClearPrecache`. |
View source
# S_EndPrecaching
function S_EndPrecaching(system)
Apply the Quake-compatible s end precaching behavior.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `S_EndPrecaching`. |
View source
# S_FindName
function S_FindName(system, name)
Apply the Quake-compatible s find name behavior.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `S_FindName`. |
name | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `S_Init`. |
arguments | dynamic | — | Command-line arguments to inspect or execute. |
memorySize | dynamic | — | Size of the requested data or resource. |
View source
# S_InitPaintChannels
function S_InitPaintChannels(system)
Apply the Quake-compatible s init paint channels behavior.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `S_InitPaintChannels`. |
View source
# S_LocalSound
function S_LocalSound(system, sound)
Apply the Quake-compatible s local sound behavior.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `S_LocalSound`. |
sound | dynamic | — | The sound input consumed by `S_LocalSound`. |
View source
# S_Play
function S_Play(system, arguments)
Apply the Quake-compatible s play behavior.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `S_Play`. |
arguments | dynamic | — | Command-line arguments to inspect or execute. |
View source
# S_PlayVol
function S_PlayVol(system, arguments)
Apply the Quake-compatible s play vol behavior.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `S_PlayVol`. |
arguments | dynamic | — | Command-line arguments to inspect or execute. |
View source
# S_PrecacheSound
function S_PrecacheSound(system, name)
Apply the Quake-compatible s precache sound behavior.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `S_PrecacheSound`. |
name | dynamic | — | Stable name that identifies the requested object or option. |
View source
# S_Shutdown
function S_Shutdown(system)
Apply the Quake-compatible s shutdown behavior.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `S_SoundInfo_f`. |
View source
# S_SoundList
function S_SoundList(system)
Apply the Quake-compatible s sound list behavior.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `S_StartSound`. |
entityNumber | dynamic | — | The entity number input consumed by `S_StartSound`. |
entityChannel | dynamic | — | The entity channel input consumed by `S_StartSound`. |
descriptor | dynamic | — | The descriptor input consumed by `S_StartSound`. |
origin | dynamic | — | World-space origin of the operation. |
volume | dynamic | — | The volume input consumed by `S_StartSound`. |
attenuation | dynamic | — | The attenuation input consumed by `S_StartSound`. |
View source
# S_Startup
function S_Startup(system)
Apply the Quake-compatible s startup behavior.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `S_StaticSound`. |
descriptor | dynamic | — | The descriptor input consumed by `S_StaticSound`. |
origin | dynamic | — | World-space origin of the operation. |
volume | dynamic | — | The volume input consumed by `S_StaticSound`. |
attenuation | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `S_StopAllSounds`. |
clear | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `S_StopSound`. |
entityNumber | dynamic | — | The entity number input consumed by `S_StopSound`. |
entityChannel | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `S_TouchSound`. |
name | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `S_Update`. |
origin | dynamic | — | World-space origin of the operation. |
forward | dynamic | — | The forward input consumed by `S_Update`. |
right | dynamic | — | The right input consumed by `S_Update`. |
up | dynamic | — | The up input consumed by `S_Update`. |
ambientLevels | dynamic | — | The ambient levels input consumed by `S_Update`. |
frameTime | dynamic | — | Time value used by the operation. |
samplePosition | dynamic | — | The sample position input consumed by `S_Update`. |
View source
# S_Update_
function S_Update_(system, samplePosition)
Apply the Quake-compatible s update behavior.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `S_Update_`. |
samplePosition | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `S_UpdateAmbientSounds`. |
ambientLevels | dynamic | — | The ambient levels input consumed by `S_UpdateAmbientSounds`. |
frameTime | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `SND_PickChannel`. |
entityNumber | dynamic | — | The entity number input consumed by `SND_PickChannel`. |
entityChannel | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | The system input consumed by `SND_Spatialize`. |
channel | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
system | dynamic | — | 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).
| Parameter | Type | Default | Description |
|---|
value | dynamic | — | 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