cacophony
    Preparing search index...

    Class PcmStreamSound

    The base interface for any sound-producing entity, including individual sounds, groups, and playbacks. BaseSound

    Hierarchy

    • RoutableSource
      • PcmStreamSound

    Implements

    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
    playbacks: PcmStreamPlayback[]
    soundType?: SoundType
    streamCapabilities?: StreamCapabilities
    • get stereoPan(): number

      Returns number

    • set stereoPan(value: number): void

      Parameters

      • value: number

      Returns void

    • Called by Bus.drainTo to move this source off the draining bus onto target. The source reroutes its primary route and/or any send that targeted bus.

      Parameters

      Returns void

    • Materialize all declared recipes, then establish this playback's sends.

      Parameters

      • playback: BasePlayback

      Returns void

    • Resolve the node used by future playbacks for their primary output. Sources left on a subsequently destroyed bus fall back to master.

      Returns GainNode

    • Establish every configured send on a newly created playback.

      Parameters

      • playback: BasePlayback

      Returns void

    • Parameters

      • value: number
      • duration: number
      • Optionaltype: FadeType

      Returns Promise<void>

    • Parameters

      • error: unknown

      Returns void

    • Route this source to a bus, or add an independent send when sendGain is provided.

      Parameters

      • target: string | Bus
      • OptionalsendGain: number

      Returns void

    • Enqueue PCM at the context's sample rate.

      Samples are interleaved according to channelCount. false means the fixed ring buffer is full (or this accepted write filled it); wait for drain before retrying a rejected chunk.

      Parameters

      • samples: Float32Array

      Returns boolean