MiniQuake

src/miniquake/sound/snd_mem.ml

Package
miniquake.sound.snd_mem
Reachable
Yes

Imports

Declarations

miniquake.sound.snd_mem.ChunkCursor struct

chunkNameAt

function chunkNameAt(cursor, offset)

Implements the `chunkNameAt` operation for `miniquake.sound.snd_mem` (chunk name at).

ParameterTypeDefaultDescription
cursordynamic—The cursor input consumed by `chunkNameAt`.
offsetdynamic—Zero-based offset of the requested data.

View source

createCursor

function createCursor(data, length)

Create and initialize cursor.

ParameterTypeDefaultDescription
datadynamic—Input data consumed by the operation.
lengthdynamic—Length of the requested data in units appropriate to the operation.

View source

createDescriptor

function createDescriptor(name)

Create and initialize descriptor.

ParameterTypeDefaultDescription
namedynamic—Stable name that identifies the requested object or option.

View source

DumpChunks

function DumpChunks(cursor)

Implements the `DumpChunks` operation for `miniquake.sound.snd_mem` (dump chunks).

ParameterTypeDefaultDescription
cursordynamic—The cursor input consumed by `DumpChunks`.

View source

emptyWaveInfo

function emptyWaveInfo()

Implements the `emptyWaveInfo` operation for `miniquake.sound.snd_mem` (empty wave info).

View source

FindChunk

function FindChunk(cursor, name)

Return chunk.

ParameterTypeDefaultDescription
cursordynamic—The cursor input consumed by `FindChunk`.
namedynamic—Stable name that identifies the requested object or option.

View source

FindNextChunk

function FindNextChunk(cursor, name)

Return next chunk.

ParameterTypeDefaultDescription
cursordynamic—The cursor input consumed by `FindNextChunk`.
namedynamic—Stable name that identifies the requested object or option.

View source

GetLittleLong

function GetLittleLong(cursor)

Return little long.

ParameterTypeDefaultDescription
cursordynamic—The cursor input consumed by `GetLittleLong`.

View source

GetLittleShort

function GetLittleShort(cursor)

Return little short.

ParameterTypeDefaultDescription
cursordynamic—The cursor input consumed by `GetLittleShort`.

View source

GetWavinfo

function GetWavinfo(name, wav, wavLength)

Return wavinfo.

ParameterTypeDefaultDescription
namedynamic—Stable name that identifies the requested object or option.
wavdynamic—The wav input consumed by `GetWavinfo`.
wavLengthdynamic—Length of the requested data in units appropriate to the operation.

View source

ResampleSfx

function ResampleSfx(cache, inRate, inWidth, source, targetRate, loadAs8Bit)

Implements the `ResampleSfx` operation for `miniquake.sound.snd_mem` (resample sfx).

ParameterTypeDefaultDescription
cachedynamic—The cache input consumed by `ResampleSfx`.
inRatedynamic—The in rate input consumed by `ResampleSfx`.
inWidthdynamic—The in width input consumed by `ResampleSfx`.
sourcedynamic—Source value or collection to read.
targetRatedynamic—The target rate input consumed by `ResampleSfx`.
loadAs8Bitdynamic—The load as8 bit input consumed by `ResampleSfx`.

View source

S_Alloc

function S_Alloc(size)

Apply the Quake-compatible s alloc behavior.

ParameterTypeDefaultDescription
sizedynamic—Size of the requested data or resource.

View source

S_LoadSound

function S_LoadSound(filesystem, descriptor, targetRate, loadAs8Bit)

Apply the Quake-compatible s load sound behavior.

ParameterTypeDefaultDescription
filesystemdynamic—The filesystem input consumed by `S_LoadSound`.
descriptordynamic—The descriptor input consumed by `S_LoadSound`.
targetRatedynamic—The target rate input consumed by `S_LoadSound`.
loadAs8Bitdynamic—The load as8 bit input consumed by `S_LoadSound`.

View source

S_LoadSoundData

function S_LoadSoundData(name, data, targetRate, loadAs8Bit)

Apply the Quake-compatible s load sound data behavior.

ParameterTypeDefaultDescription
namedynamic—Stable name that identifies the requested object or option.
datadynamic—Input data consumed by the operation.
targetRatedynamic—The target rate input consumed by `S_LoadSoundData`.
loadAs8Bitdynamic—The load as8 bit input consumed by `S_LoadSoundData`.

View source

miniquake.sound.snd_mem.SoundCache struct

miniquake.sound.snd_mem.SoundDescriptor struct

soundF32

function soundF32(value)

Implements the `soundF32` operation for `miniquake.sound.snd_mem` (sound f32).

ParameterTypeDefaultDescription
valuedynamic—Value consumed by `soundF32`.

View source

soundPath

function soundPath(name)

Return sound path derived from the active module state.

ParameterTypeDefaultDescription
namedynamic—Stable name that identifies the requested object or option.

View source

toSoundEffect

function toSoundEffect(descriptor)

Implements the `toSoundEffect` operation for `miniquake.sound.snd_mem` (to sound effect).

ParameterTypeDefaultDescription
descriptordynamic—The descriptor input consumed by `toSoundEffect`.

View source