sfml.js
    Preparing search index...

    Interface SoundStreamOptions

    自定义 PCM 播放流的格式和 Worker 配置。

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

    Hierarchy (View Summary)

    Index

    Properties

    blockFrames?: number

    每个块的帧数,默认 1024;一帧包含所有声道的样本。

    channelCount: number

    交错 PCM 的声道数。

    channelMap: Iterable<SoundChannel>

    每个交错声道对应的扬声器位置。

    data?: unknown

    通过结构化克隆传给工厂函数的初始数据。

    exportName?: string

    工厂函数导出名,省略时使用默认导出。

    module: string | URL

    Worker 加载的模块路径或 URL,导出音频回调工厂函数。

    queueBlocks?: number

    原生队列中的块数,默认 8。

    sampleRate: number

    采样率,单位为 Hz。