cacophony
    Preparing search index...

    Class MicrophoneStream

    A live microphone source backed by the current MediaStreamSound architecture. Use MicrophoneStream.request (or Cacophony.getMicrophoneStream) when the stream still needs to be acquired so permission failures remain observable.

    Hierarchy (View Summary)

    Index
    _filters: BiquadFilterNode[] = []
    _position: Position
    _routeTarget: Bus | null = null

    Primary route target. null is the canonical master route.

    _sends: Map<Bus, number> = ...

    Additional send target to gain-value mappings.

    _stereoPan: number
    _threeDOptions: ThreeDOptions
    _volume: number
    context: BaseContext
    globalGainNode: GainNode
    panType: PanType
    playbacks: MediaStreamPlayback[]
    spatialSmoothingTau: number

    Spatial time constant in seconds; assigning changes current and future voices.

    • get isPlaying(): boolean

      Returns boolean

    • get playbackRate(): number

      Returns number

    • set playbackRate(_rate: number): void

      Parameters

      • _rate: number

      Returns void

    • get stereoPan(): number

      Returns number

    • set stereoPan(value: number): void

      Parameters

      • value: number

      Returns void

    • get volume(): number

      Returns number

    • set volume(volume: number): void

      Parameters

      • volume: number

      Returns void

    • Remove this source's aux send from current and future playbacks without changing its primary route. No-op if no send exists, including when the bus reference is destroyed. Names must still resolve to a registered bus; retain the bus reference to remove a send after destroying a named bus.

      Parameters

      • target: string | Bus

      Returns void

    • Route this source to a bus, or add an independent send when sendGain is provided. options ramps existing sends in place; new sends and future playbacks start at sendGain. Prior automation is canceled and re-anchored. Exponential ramps to zero approach 0.0001, then become exactly silent at the endpoint. Ramps from zero or involving negative gains use linear interpolation.

      Parameters

      Returns void

      RangeError for non-finite gain or negative/non-finite duration.

      TypeError when options is given without sendGain; primary routes do not ramp.