Audio Loom - v0.3.0
    Preparing search index...

    Class ContextManager

    Manages the Web Audio API AudioContext lifecycle. Handles context creation, master gain, and suspend/resume.

    Index

    Constructors

    Methods

    • Gets or creates the AudioContext. Creates the master gain node on first call.

      Returns AudioContext

    • Gets the current AudioContext, or null if not created.

      Returns AudioContext | null

    • Gets the master gain node, or null if context not created.

      Returns GainNode | null

    • Sets the master volume that affects all audio output.

      Parameters

      • volume: number

      Returns void

    • Initializes the AudioContext and resumes it if suspended.

      Returns Promise<void>

    • Suspends the AudioContext to save resources.

      Returns Promise<void>

    • Disconnects the master gain from destination. Used when setting up effects bus routing.

      Returns void

    • Connects the master gain to a target node.

      Parameters

      • target: AudioNode

      Returns void