Class Cacophony

Constructors

Properties

cache: ICache
context: IAudioContext
finalizationRegistry: FinalizationRegistry<Playback>
globalGainNode: GainNode
listener: IAudioListener
prevVolume: number = 1

Accessors

Methods

  • Parameters

    • __namedParameters: BiquadFilterOptions

    Returns BiquadFilterNode

  • Creates a PannerNode with the specified options.

    Parameters

    • options: Partial<IPannerOptions>

      An object containing the options to use when creating the PannerNode.

    Returns PannerNode

    A new PannerNode instance with the specified options.

    Example

    const panner = audio.createPanner({
    positionX: 0,
    positionY: 0,
    positionZ: 0,
    orientationX: 0,
    orientationY: 0,
    orientationZ: 0,
    });
  • Parameters

    • name: string
    • url: string

    Returns Promise<IAudioWorkletNode<IAudioContext>>

  • Returns Promise<MicrophoneStream>

  • Suspends the audio context.

    Returns void

  • Resumes the audio context. This method is required to resume the audio context on mobile devices. On desktop, the audio context will automatically resume when a sound is played.

    Returns void

  • Parameters

    • volume: number

    Returns void