Taos API Reference
    Preparing search index...

    Function generateImpulseResponse

    • Generates a synthetic impulse response: exponentially-decaying white noise. Pure (aside from the ctx.createBuffer allocation) so it can be unit-tested with a minimal mock context. random defaults to Math.random and can be injected for deterministic tests.

      Parameters

      • ctx: BaseAudioContext
      • seconds: number
      • decay: number
      • random: () => number = Math.random

      Returns AudioBuffer