MiniQuake2

src/miniquake2/server/sound_events.ml

Provides miniquake2 server sound events facilities for this project.

Package
miniquake2.server.sound_events
Reachable
Yes

Imports

Declarations

clearPending

function clearPending(runtime)

Report whether clear pending.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.

View source

copiedPosition

function copiedPosition(position)

Return the copied position.

ParameterTypeDefaultDescription
positiondynamic—position value consumed by this operation.

View source

encode

function encode(event)

Encodes encode for the miniquake2 server sound events workflow.

ParameterTypeDefaultDescription
eventdynamic—event value consumed by this operation.

View source

encodeAll

function encodeAll(events)

Encode all.

ParameterTypeDefaultDescription
eventsdynamic—events value consumed by this operation.

View source

enqueue

function enqueue(runtime, position, routingPosition, entity, channelFlags, soundIndex, volume, attenuation, timeOffset)

Return the enqueue value.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
positiondynamic—position value consumed by this operation.
routingPositiondynamic—routingPosition value consumed by this operation.
entitydynamic—entity value consumed by this operation.
channelFlagsdynamic—channelFlags value consumed by this operation.
soundIndexdynamic—Zero-based index of sound.
volumedynamic—volume value consumed by this operation.
attenuationdynamic—attenuation value consumed by this operation.
timeOffsetdynamic—timeOffset value consumed by this operation.

View source

entityFields

function entityFields(entity)

Return the entity fields value.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.

View source

MAX_PENDING_SOUND_EVENTS

const MAX_PENDING_SOUND_EVENTS = 1024

Defines the max pending sound events constant used by the miniquake2 server sound events module.

View source

MAX_SOUND_FRAGMENT_BYTES

const MAX_SOUND_FRAGMENT_BYTES = 14

Defines the max sound fragment bytes constant used by the miniquake2 server sound events module.

View source

numeric

function numeric(value)

Performs the numeric operation for the miniquake2 server sound events module.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

packetize

function packetize(fragments, maximumPayload)

Performs the packetize operation for the miniquake2 server sound events module.

ParameterTypeDefaultDescription
fragmentsdynamic—fragments value consumed by this operation.
maximumPayloaddynamic—maximumPayload value consumed by this operation.

View source

pendingSnapshot

function pendingSnapshot(runtime)

The live bridge owns one fixed-capacity array. Enqueue is O(1); a compact owned view is made only once at the server-frame dispatch boundary.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.

View source

restorePending

function restorePending(runtime, events)

Report whether restore pending.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
eventsdynamic—events value consumed by this operation.

View source

validateAll

function validateAll(events)

Validate all.

ParameterTypeDefaultDescription
eventsdynamic—events value consumed by this operation.

View source

validateFields

function validateFields(hasEntity, entityNumber, channel, channelFlags, soundIndex, volume, attenuation, timeOffset, position)

Validate fields.

ParameterTypeDefaultDescription
hasEntitydynamic—hasEntity value consumed by this operation.
entityNumberdynamic—entityNumber value consumed by this operation.
channeldynamic—channel value consumed by this operation.
channelFlagsdynamic—channelFlags value consumed by this operation.
soundIndexdynamic—Zero-based index of sound.
volumedynamic—volume value consumed by this operation.
attenuationdynamic—attenuation value consumed by this operation.
timeOffsetdynamic—timeOffset value consumed by this operation.
positiondynamic—position value consumed by this operation.

View source

validUnit

function validUnit(value, minimum, maximum)

Report whether valid unit.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.
minimumdynamic—minimum value consumed by this operation.
maximumdynamic—maximum value consumed by this operation.

View source