# activeMixer
activeMixerStores module-wide active mixer state for the miniquake2 client effects mixer adapter module.
src/miniquake2/client/effects/mixer_adapter.mlProvides miniquake2 client effects mixer adapter facilities for this project.
miniquake2/audio/mixer.ml as amixer → src/miniquake2/audio/mixer.mlminiquake2/client/effects/audio.ml as ceaudio → src/miniquake2/client/effects/audio.mlminiquake2/qcommon/byteio.ml as qbio → src/miniquake2/qcommon/byteio.mlminiquake2/qcommon/constants.ml as qconstants → src/miniquake2/qcommon/constants.mlminiquake2/qcommon/types.ml as qtypes → src/miniquake2/qcommon/types.mlactiveMixerStores module-wide active mixer state for the miniquake2 client effects mixer adapter module.
entityPositionResolverStores module-wide entity position resolver state for the miniquake2 client effects mixer adapter module.
entitySoundResolverStores module-wide entity sound resolver state for the miniquake2 client effects mixer adapter module.
indexResolverStores module-wide index resolver state for the miniquake2 client effects mixer adapter module.
function install(mixer, resolveIndexCallback, resolveNameCallback, resolveEntitySoundCallback, entityPositionCallback, origin, right)Install state.
| Parameter | Type | Default | Description |
|---|---|---|---|
mixer | dynamic | — | mixer value consumed by this operation. |
resolveIndexCallback | dynamic | — | resolveIndexCallback value consumed by this operation. |
resolveNameCallback | dynamic | — | resolveNameCallback value consumed by this operation. |
resolveEntitySoundCallback | dynamic | — | resolveEntitySoundCallback value consumed by this operation. |
entityPositionCallback | dynamic | — | entityPositionCallback value consumed by this operation. |
origin | dynamic | — | origin value consumed by this operation. |
right | dynamic | — | right value consumed by this operation. |
listenerEntityNumberStores module-wide listener entity number state for the miniquake2 client effects mixer adapter module.
listenerOriginStores module-wide listener origin state for the miniquake2 client effects mixer adapter module.
listenerRightStores module-wide listener right state for the miniquake2 client effects mixer adapter module.
loopSoundAvailableStores module-wide loop sound available state for the miniquake2 client effects mixer adapter module.
loopSoundEpochStores module-wide loop sound epoch state for the miniquake2 client effects mixer adapter module.
loopSoundIndicesStores module-wide loop sound indices state for the miniquake2 client effects mixer adapter module.
loopSoundLeftStores module-wide loop sound left state for the miniquake2 client effects mixer adapter module.
loopSoundResolvedStores module-wide loop sound resolved state for the miniquake2 client effects mixer adapter module.
loopSoundRightStores module-wide loop sound right state for the miniquake2 client effects mixer adapter module.
loopSoundSeenStores module-wide loop sound seen state for the miniquake2 client effects mixer adapter module.
mixerSpatialScratchStores module-wide mixer spatial scratch state for the miniquake2 client effects mixer adapter module.
nameResolverStores module-wide name resolver state for the miniquake2 client effects mixer adapter module.
function play(event, sound)Play state.
| Parameter | Type | Default | Description |
|---|---|---|---|
event | dynamic | — | event value consumed by this operation. |
sound | dynamic | — | sound value consumed by this operation. |
function release()Release state.
function resolveIndex(index)Resolve index.
| Parameter | Type | Default | Description |
|---|---|---|---|
index | dynamic | — | Zero-based index of the affected item. |
function resolveName(name)Resolve name.
| Parameter | Type | Default | Description |
|---|---|---|---|
name | dynamic | — | Name of the affected item. |
function respatializeDynamic(mixer, entityPositionCallback, origin, right, localEntityNumber)Return the respatialize dynamic value.
| Parameter | Type | Default | Description |
|---|---|---|---|
mixer | dynamic | — | mixer value consumed by this operation. |
entityPositionCallback | dynamic | — | entityPositionCallback value consumed by this operation. |
origin | dynamic | — | origin value consumed by this operation. |
right | dynamic | — | right value consumed by this operation. |
localEntityNumber | dynamic | — | localEntityNumber value consumed by this operation. |
function setListenerEntity(number)Set listener entity.
| Parameter | Type | Default | Description |
|---|---|---|---|
number | dynamic | — | number value consumed by this operation. |
function syncEntityLoops(mixer, snapshot)Backwards-compatible active-game entry point. Runtime owners that implement cl_paused should call syncEntityLoopsPaused with their pause state.
| Parameter | Type | Default | Description |
|---|---|---|---|
mixer | dynamic | — | mixer value consumed by this operation. |
snapshot | dynamic | — | snapshot value consumed by this operation. |
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
mixer | dynamic | — | mixer value consumed by this operation. |
snapshot | dynamic | — | snapshot value consumed by this operation. |
paused | dynamic | — | paused value consumed by this operation. |