MiniQuake2

src/miniquake2/client/effects/mixer_adapter.ml

Provides miniquake2 client effects mixer adapter facilities for this project.

Package
miniquake2.client.effects.mixer_adapter
Reachable
Yes

Imports

Declarations

activeMixer

activeMixer

Stores module-wide active mixer state for the miniquake2 client effects mixer adapter module.

View source

entityPositionResolver

entityPositionResolver

Stores module-wide entity position resolver state for the miniquake2 client effects mixer adapter module.

View source

entitySoundResolver

entitySoundResolver

Stores module-wide entity sound resolver state for the miniquake2 client effects mixer adapter module.

View source

indexResolver

indexResolver

Stores module-wide index resolver state for the miniquake2 client effects mixer adapter module.

View source

install

function install(mixer, resolveIndexCallback, resolveNameCallback, resolveEntitySoundCallback, entityPositionCallback, origin, right)

Install state.

ParameterTypeDefaultDescription
mixerdynamic—mixer value consumed by this operation.
resolveIndexCallbackdynamic—resolveIndexCallback value consumed by this operation.
resolveNameCallbackdynamic—resolveNameCallback value consumed by this operation.
resolveEntitySoundCallbackdynamic—resolveEntitySoundCallback value consumed by this operation.
entityPositionCallbackdynamic—entityPositionCallback value consumed by this operation.
origindynamic—origin value consumed by this operation.
rightdynamic—right value consumed by this operation.

View source

listenerEntityNumber

listenerEntityNumber

Stores module-wide listener entity number state for the miniquake2 client effects mixer adapter module.

View source

listenerOrigin

listenerOrigin

Stores module-wide listener origin state for the miniquake2 client effects mixer adapter module.

View source

listenerRight

listenerRight

Stores module-wide listener right state for the miniquake2 client effects mixer adapter module.

View source

loopSoundAvailable

loopSoundAvailable

Stores module-wide loop sound available state for the miniquake2 client effects mixer adapter module.

View source

loopSoundEpoch

loopSoundEpoch

Stores module-wide loop sound epoch state for the miniquake2 client effects mixer adapter module.

View source

loopSoundIndices

loopSoundIndices

Stores module-wide loop sound indices state for the miniquake2 client effects mixer adapter module.

View source

loopSoundLeft

loopSoundLeft

Stores module-wide loop sound left state for the miniquake2 client effects mixer adapter module.

View source

loopSoundResolved

loopSoundResolved

Stores module-wide loop sound resolved state for the miniquake2 client effects mixer adapter module.

View source

loopSoundRight

loopSoundRight

Stores module-wide loop sound right state for the miniquake2 client effects mixer adapter module.

View source

loopSoundSeen

loopSoundSeen

Stores module-wide loop sound seen state for the miniquake2 client effects mixer adapter module.

View source

mixerSpatialScratch

mixerSpatialScratch

Stores module-wide mixer spatial scratch state for the miniquake2 client effects mixer adapter module.

View source

nameResolver

nameResolver

Stores module-wide name resolver state for the miniquake2 client effects mixer adapter module.

View source

play

function play(event, sound)

Play state.

ParameterTypeDefaultDescription
eventdynamic—event value consumed by this operation.
sounddynamic—sound value consumed by this operation.

View source

release

function release()

Release state.

View source

resolveIndex

function resolveIndex(index)

Resolve index.

ParameterTypeDefaultDescription
indexdynamic—Zero-based index of the affected item.

View source

resolveName

function resolveName(name)

Resolve name.

ParameterTypeDefaultDescription
namedynamic—Name of the affected item.

View source

respatializeDynamic

function respatializeDynamic(mixer, entityPositionCallback, origin, right, localEntityNumber)

Return the respatialize dynamic value.

ParameterTypeDefaultDescription
mixerdynamic—mixer value consumed by this operation.
entityPositionCallbackdynamic—entityPositionCallback value consumed by this operation.
origindynamic—origin value consumed by this operation.
rightdynamic—right value consumed by this operation.
localEntityNumberdynamic—localEntityNumber value consumed by this operation.

View source

setListenerEntity

function setListenerEntity(number)

Set listener entity.

ParameterTypeDefaultDescription
numberdynamic—number value consumed by this operation.

View source

syncEntityLoops

function syncEntityLoops(mixer, snapshot)

Backwards-compatible active-game entry point. Runtime owners that implement cl_paused should call syncEntityLoopsPaused with their pause state.

ParameterTypeDefaultDescription
mixerdynamic—mixer value consumed by this operation.
snapshotdynamic—snapshot value consumed by this operation.

View source

syncEntityLoopsPaused

function syncEntityLoopsPaused(mixer, snapshot, paused)

Reproduce S_AddLoopSounds for EntityState.sound. Identical sound indexes are merged into one autosound channel and their spatial contributions are summed, exactly as the stock client does for doors, plats, ambients and projectile flight loops.

ParameterTypeDefaultDescription
mixerdynamic—mixer value consumed by this operation.
snapshotdynamic—snapshot value consumed by this operation.
pauseddynamic—paused value consumed by this operation.

View source