Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WebAudio

An audio implementation for Web Audio API.

Hierarchy

  • WebAudio

Implements

Index

Properties

Private _logger

_logger: Logger = Logger.getInstance()

responseType

responseType: string = "arraybuffer"

Static Private _unlocked

_unlocked: boolean = false

Methods

createInstance

  • createInstance(buffer: AudioBuffer): IAudio
  • Creates a new WebAudio AudioBufferSourceNode to play a sound instance

    Parameters

    • buffer: AudioBuffer

    Returns IAudio

processData

  • processData(data: ArrayBuffer): Promise<AudioBuffer>
  • Processes raw arraybuffer data and decodes into WebAudio buffer (async).

    Parameters

    • data: ArrayBuffer

    Returns Promise<AudioBuffer>

Static isUnlocked

  • isUnlocked(): boolean
  • Returns boolean

Static unlock

  • unlock(): void