Options
Menu

Interface ChromeAudioContext

Hierarchy

Index

Properties

AudioContext

AudioContext: object

Type declaration

  • constructor: function
    • new __type(contextOptions?: AudioContextOptions): AudioContext
    • Parameters

      • Optional contextOptions: AudioContextOptions

      Returns AudioContext

  • prototype: AudioContext

Readonly audioWorklet

audioWorklet: AudioWorklet

Readonly baseLatency

baseLatency: number

createMediaStreamDestination

createMediaStreamDestination: function

Type declaration

    • (): any
    • Returns any

Readonly currentTime

currentTime: number

destination

Readonly listener

listener: AudioListener

onstatechange

onstatechange: function | null

Readonly outputLatency

outputLatency: number

Readonly sampleRate

sampleRate: number

Readonly state

state: AudioContextState

Methods

addEventListener

  • addEventListener<K>(type: K, listener: function, options?: boolean | AddEventListenerOptions): void
  • addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void
  • Type parameters

    • K: keyof BaseAudioContextEventMap

    Parameters

    • type: K
    • listener: function
        • (this: AudioContext, ev: BaseAudioContextEventMap[K]): any
        • Parameters

          Returns any

    • Optional options: boolean | AddEventListenerOptions

    Returns void

  • Parameters

    • type: string
    • listener: EventListenerOrEventListenerObject
    • Optional options: boolean | AddEventListenerOptions

    Returns void

close

  • close(): Promise<void>

createAnalyser

  • createAnalyser(): AnalyserNode

createBiquadFilter

  • createBiquadFilter(): BiquadFilterNode

createBuffer

  • createBuffer(numberOfChannels: number, length: number, sampleRate: number): AudioBuffer

createBufferSource

  • createBufferSource(): AudioBufferSourceNode

createChannelMerger

  • createChannelMerger(numberOfInputs?: undefined | number): ChannelMergerNode

createChannelSplitter

  • createChannelSplitter(numberOfOutputs?: undefined | number): ChannelSplitterNode

createConstantSource

  • createConstantSource(): ConstantSourceNode

createConvolver

  • createConvolver(): ConvolverNode

createDelay

  • createDelay(maxDelayTime?: undefined | number): DelayNode

createDynamicsCompressor

  • createDynamicsCompressor(): DynamicsCompressorNode

createGain

  • createGain(): GainNode

createIIRFilter

  • createIIRFilter(feedforward: number[], feedback: number[]): IIRFilterNode

createMediaElementSource

  • createMediaElementSource(mediaElement: HTMLMediaElement): MediaElementAudioSourceNode

createMediaStreamSource

  • createMediaStreamSource(mediaStream: MediaStream): MediaStreamAudioSourceNode

createMediaStreamTrackSource

  • createMediaStreamTrackSource(mediaStreamTrack: MediaStreamTrack): MediaStreamTrackAudioSourceNode

createOscillator

  • createOscillator(): OscillatorNode

createPanner

  • createPanner(): PannerNode

createPeriodicWave

  • createPeriodicWave(real: number[] | Float32Array, imag: number[] | Float32Array, constraints?: PeriodicWaveConstraints): PeriodicWave
  • Parameters

    • real: number[] | Float32Array
    • imag: number[] | Float32Array
    • Optional constraints: PeriodicWaveConstraints

    Returns PeriodicWave

createScriptProcessor

  • createScriptProcessor(bufferSize?: undefined | number, numberOfInputChannels?: undefined | number, numberOfOutputChannels?: undefined | number): ScriptProcessorNode
  • Parameters

    • Optional bufferSize: undefined | number
    • Optional numberOfInputChannels: undefined | number
    • Optional numberOfOutputChannels: undefined | number

    Returns ScriptProcessorNode

createStereoPanner

  • createStereoPanner(): StereoPannerNode

createWaveShaper

  • createWaveShaper(): WaveShaperNode

decodeAudioData

  • decodeAudioData(audioData: ArrayBuffer, successCallback?: DecodeSuccessCallback | null, errorCallback?: DecodeErrorCallback | null): Promise<AudioBuffer>
  • Parameters

    • audioData: ArrayBuffer
    • Optional successCallback: DecodeSuccessCallback | null
    • Optional errorCallback: DecodeErrorCallback | null

    Returns Promise<AudioBuffer>

dispatchEvent

  • dispatchEvent(event: Event): boolean
  • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

    Parameters

    • event: Event

    Returns boolean

getOutputTimestamp

  • getOutputTimestamp(): AudioTimestamp

removeEventListener

  • removeEventListener<K>(type: K, listener: function, options?: boolean | EventListenerOptions): void
  • removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void
  • Type parameters

    • K: keyof BaseAudioContextEventMap

    Parameters

    • type: K
    • listener: function
        • (this: AudioContext, ev: BaseAudioContextEventMap[K]): any
        • Parameters

          Returns any

    • Optional options: boolean | EventListenerOptions

    Returns void

  • Parameters

    • type: string
    • listener: EventListenerOrEventListenerObject
    • Optional options: boolean | EventListenerOptions

    Returns void

resume

  • resume(): Promise<void>

suspend

  • suspend(): Promise<void>

Generated using TypeDoc