sfml.js
    Preparing search index...

    Class OutputSoundFile

    将交错 16 位 PCM 异步编码到音频文件,格式由文件扩展名决定。

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    "[audioHandle]": AudioHandle<"output"> = ...

    Methods

    • 等待所有写入、刷新编码器并关闭文件,确保文件内容完整。

      Returns Promise<void>

    • 关闭旧输出并异步创建文件,采样率以 Hz 计,返回是否成功。

      Parameters

      • filename: string
      • sampleRate: number
      • channelCount: number
      • channelMap: Iterable<SoundChannel>

      Returns Promise<boolean>

    • 按顺序异步编码样本;Promise 完成前不得修改 data。

      Parameters

      • data: Int16Array

      Returns Promise<void>