MiniQuake

src/miniquake/sound/snd_mix.ml

Package
miniquake.sound.snd_mix
Reachable
No

Imports

Declarations

clamp16

function clamp16(value)

Clamps 16 for `miniquake.sound.snd_mix`.

ParameterTypeDefaultDescription
valuedynamic—Value consumed by `clamp16`.

View source

clearPaintBuffer

function clearPaintBuffer(state, frameCount)

Update module state for paint buffer.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.sound.snd_mix` state used by `clearPaintBuffer`.
frameCountdynamic—Number of entries or units to process.

View source

createChannel

function createChannel()

Create and initialize channel.

View source

createDma

function createDma(speed, sampleBits, channels, samples)

Create and initialize dma.

ParameterTypeDefaultDescription
speeddynamic—The speed input consumed by `createDma`.
sampleBitsdynamic—The sample bits input consumed by `createDma`.
channelsdynamic—Number of interleaved audio channels.
samplesdynamic—The samples input consumed by `createDma`.

View source

createState

function createState(dma)

Creates state for `miniquake.sound.snd_mix`.

ParameterTypeDefaultDescription
dmadynamic—The dma input consumed by `createState`.

View source

miniquake.sound.snd_mix.DmaSoundBuffer struct

MAX_CHANNELS

const MAX_CHANNELS = 128

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

View source

miniquake.sound.snd_mix.MixState struct

PAINTBUFFER_SIZE

const PAINTBUFFER_SIZE = 512

Defines the paintbuffer size value used by `miniquake.sound.snd_mix`.

View source

resetChannel

function resetChannel(channel)

Update module state for channel.

ParameterTypeDefaultDescription
channeldynamic—The channel input consumed by `resetChannel`.

View source

S_PaintChannels

function S_PaintChannels(state, endTime)

Apply the Quake-compatible s paint channels behavior.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.sound.snd_mix` state used by `S_PaintChannels`.
endTimedynamic—Time value used by the operation.

View source

S_TransferPaintBuffer

function S_TransferPaintBuffer(state, endTime)

Apply the Quake-compatible s transfer paint buffer behavior.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.sound.snd_mix` state used by `S_TransferPaintBuffer`.
endTimedynamic—Time value used by the operation.

View source

S_TransferStereo16

function S_TransferStereo16(state, endTime)

Apply the Quake-compatible s transfer stereo16 behavior.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.sound.snd_mix` state used by `S_TransferStereo16`.
endTimedynamic—Time value used by the operation.

View source

signedByte

function signedByte(value)

Return signed byte derived from the active module state.

ParameterTypeDefaultDescription
valuedynamic—Value consumed by `signedByte`.

View source

SND_InitScaletable

function SND_InitScaletable(state)

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

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.sound.snd_mix` state used by `SND_InitScaletable`.

View source

SND_PaintChannelFrom16

function SND_PaintChannelFrom16(state, channel, cache, count)

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

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.sound.snd_mix` state used by `SND_PaintChannelFrom16`.
channeldynamic—The channel input consumed by `SND_PaintChannelFrom16`.
cachedynamic—The cache input consumed by `SND_PaintChannelFrom16`.
countdynamic—Number of entries or units to process.

View source

SND_PaintChannelFrom8

function SND_PaintChannelFrom8(state, channel, cache, count)

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

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.sound.snd_mix` state used by `SND_PaintChannelFrom8`.
channeldynamic—The channel input consumed by `SND_PaintChannelFrom8`.
cachedynamic—The cache input consumed by `SND_PaintChannelFrom8`.
countdynamic—Number of entries or units to process.

View source

Snd_WriteLinearBlastStereo16

function Snd_WriteLinearBlastStereo16(state)

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

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.sound.snd_mix` state used by `Snd_WriteLinearBlastStereo16`.

View source

miniquake.sound.snd_mix.SoundChannel struct

soundI32

function soundI32(value)

Implements the `soundI32` operation for `miniquake.sound.snd_mix` (sound i32).

ParameterTypeDefaultDescription
valuedynamic—Value consumed by `soundI32`.

View source