API reference
Preparing search index…

SoundStreamOptions

Format and Worker configuration for a custom PCM playback stream.

interface SoundStreamOptions {
    blockFrames?: number;
    channelCount: number;
    channelMap: Iterable<SoundChannel>;
    data?: unknown;
    exportName?: string;
    module: string | URL;
    queueBlocks?: number;
    sampleRate: number;
}
Type hierarchy

Hierarchy (View Summary)

Source & inheritance
Member directory8

Properties

Properties

blockFrames?: number

Frames per block, defaulting to 1024; a frame contains samples for all channels.

Source & inheritance
channelCount: number

Number of channels in the interleaved PCM.

Source & inheritance
channelMap: Iterable<SoundChannel>

Speaker position corresponding to each interleaved channel.

Source & inheritance
data?: unknown

Initial data passed to the factory through structured cloning.

Source & inheritance
exportName?: string

Factory export name; uses the default export when omitted.

Source & inheritance
module: string | URL

Module path or URL loaded by the Worker, exporting an audio callback factory.

Source & inheritance
queueBlocks?: number

Number of blocks in the native queue, defaulting to 8.

Source & inheritance
sampleRate: number

Sample rate in Hz.

Source & inheritance

Icons made by Lorc, Delapouite & Skoll · game-icons.net · CC BY 3.0