Class

io.scalajs.dom.html.audio

AudioContext

Related Doc: package audio

Permalink

class AudioContext extends Object

The AudioContext interface represents an audio-processing graph built from audio modules linked together, each represented by an AudioNode. An audio context controls both the creation of the nodes it contains and the execution of the audio processing, or decoding. You need to create an AudioContext before you do anything else, as everything happens inside a context.

An AudioContext can be a target of events, therefore it implements the EventTarget interface.

Annotations
@RawJSType() @native()
Linear Supertypes
Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AudioContext
  2. Object
  3. Any
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AudioContext()

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def close(): Unit

    Permalink

    Closes the audio context, releasing any system audio resources that it uses.

  7. def createAnalyser(): AnalyserNode

    Permalink

    Creates an AnalyserNode, which can be used to expose audio time and frequency data and for example to create data visualisations.

  8. def createAudioWorker(): AudioWorkerNode

    Permalink

    Creates an AudioWorkerNode, which can interact with a web worker thread to generate, process, or analyse audio directly.

    Creates an AudioWorkerNode, which can interact with a web worker thread to generate, process, or analyse audio directly. This was added to the spec on August 29 2014, and is not implemented in any browser yet.

  9. def createBiquadFilter(): BiquadFilterNode

    Permalink

    Creates a BiquadFilterNode, which represents a second order filter configurable as several different common filter types: high-pass, low-pass, band-pass, etc.

  10. def createBuffer(): AudioBuffer

    Permalink

    Creates a new, empty AudioBuffer object, which can then be populated by data and played via an AudioBufferSourceNode.

  11. def createBufferSource(): AudioBufferSourceNode

    Permalink

    Creates an AudioBufferSourceNode, which can be used to play and manipulate audio data contained within an AudioBuffer object.

    Creates an AudioBufferSourceNode, which can be used to play and manipulate audio data contained within an AudioBuffer object. AudioBuffers are created using AudioContext.createBuffer or returned by AudioContext.decodeAudioData when it successfully decodes an audio track.

  12. def createChannelMerger(): ChannelMergerNode

    Permalink

    Creates a ChannelMergerNode, which is used to combine channels from multiple audio streams into a single audio stream.

  13. def createChannelSplitter(): ChannelSplitterNode

    Permalink

    Creates a ChannelSplitterNode, which is used to access the individual channels of an audio stream and process them separately.

  14. def createConstantSource(): ConstantSourceNode

    Permalink

    Creates a ConstantSourceNode object, which is an audio source that continuously outputs a monaural (one-channel) sound signal whose samples all have the same value.

  15. def createConvolver(): ConvolverNode

    Permalink

    Creates a ConvolverNode, which can be used to apply convolution effects to your audio graph, for example a reverberation effect.

  16. def createDelay(): DelayNode

    Permalink

    Creates a DelayNode, which is used to delay the incoming audio signal by a certain amount.

    Creates a DelayNode, which is used to delay the incoming audio signal by a certain amount. This node is also useful to create feedback loops in a Web Audio API graph.

  17. def createDynamicsCompressor(): DynamicsCompressorNode

    Permalink

    Creates a DynamicsCompressorNode, which can be used to apply acoustic compression to an audio signal.

  18. def createGain(): GainNode

    Permalink

    Creates a GainNode, which can be used to control the overall volume of the audio graph.

  19. def createIIRFilter(): IIRFilterNode

    Permalink

    Creates an IIRFilterNode, which represents a second order filter configurable as several different common filter types.

  20. def createMediaElementSource(): MediaElementAudioSourceNode

    Permalink

    Creates a MediaElementAudioSourceNode associated with an HTMLMediaElement.

    Creates a MediaElementAudioSourceNode associated with an HTMLMediaElement. This can be used to play and manipulate audio from <video> or <audio> elements.

  21. def createMediaStreamDestination(): MediaStreamAudioDestinationNode

    Permalink

    Creates a MediaStreamAudioDestinationNode associated with a MediaStream representing an audio stream which may be stored in a local file or sent to another computer.

  22. def createMediaStreamSource(): MediaStreamAudioSourceNode

    Permalink

    Creates a MediaStreamAudioSourceNode associated with a MediaStream representing an audio stream which may come from the local computer microphone or other sources.

  23. def createOscillator(): OscillatorNode

    Permalink

    Creates an OscillatorNode, a source representing a periodic waveform.

    Creates an OscillatorNode, a source representing a periodic waveform. It basically generates a tone.

  24. def createPanner(): PannerNode

    Permalink

    Creates a PannerNode, which is used to spatialise an incoming audio stream in 3D space.

  25. def createPeriodicWave(): PeriodicWave

    Permalink

    Creates a PeriodicWave, used to define a periodic waveform that can be used to determine the output of an OscillatorNode.

  26. def createScriptProcessor(): ScriptProcessorNode

    Permalink

    Creates a ScriptProcessorNode, which can be used for direct audio processing via JavaScript.

  27. def createStereoPanner(): StereoPannerNode

    Permalink

    Creates a StereoPannerNode, which can be used to apply stereo panning to an audio source.

  28. def createWaveShaper(): WaveShaperNode

    Permalink

    Creates a WaveShaperNode, which is used to implement non-linear distortion effects.

  29. def currentTime: Double

    Permalink

    Returns a double representing an ever-increasing hardware time in seconds used for scheduling.

    Returns a double representing an ever-increasing hardware time in seconds used for scheduling. It starts at 0.

  30. def decodeAudioData(): Unit

    Permalink

    Asynchronously decodes audio file data contained in an ArrayBuffer.

    Asynchronously decodes audio file data contained in an ArrayBuffer. In this case, the ArrayBuffer is usually loaded from an XMLHttpRequest's response attribute after setting the responseType to arraybuffer. This method only works on complete files, not fragments of audio files.

  31. def destination: AudioDestinationNode

    Permalink

    Returns an AudioDestinationNode representing the final destination of all audio in the context.

    Returns an AudioDestinationNode representing the final destination of all audio in the context. It can be thought of as the audio-rendering device.

  32. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  33. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  34. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  35. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  36. def hasOwnProperty(v: String): Boolean

    Permalink
    Definition Classes
    Object
  37. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  38. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  39. def isPrototypeOf(v: Object): Boolean

    Permalink
    Definition Classes
    Object
  40. var listener: Function

    Permalink

    Returns the AudioListener object, used for 3D spatialization.

  41. def mozAudioChannelType: Int

    Permalink

    Used to return the audio channel that the sound playing in an AudioContext will play in, on a Firefox OS device.

  42. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  43. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  44. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  45. def onstatechange: Function

    Permalink

    An event handler that runs when an event of type statechange has fired.

    An event handler that runs when an event of type statechange has fired. This occurs when the AudioContext's state changes, due to the calling of one of the state change methods (AudioContext.suspend, AudioContext.resume, or AudioContext.close).

  46. def propertyIsEnumerable(v: String): Boolean

    Permalink
    Definition Classes
    Object
  47. def resume(): Unit

    Permalink

    Resumes the progression of time in an audio context that has previously been suspended.

  48. def sampleRate: Double

    Permalink

    Returns a float representing the sample rate (in samples per second) used by all nodes in this context.

    Returns a float representing the sample rate (in samples per second) used by all nodes in this context. The sample-rate of an AudioContext cannot be changed.

  49. def state: Int

    Permalink

    Returns the current state of the AudioContext.

  50. def suspend(): Unit

    Permalink

    Suspends the progression of time in the audio context, temporarily halting audio hardware access and reducing CPU/battery usage in the process.

  51. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  52. def toLocaleString(): String

    Permalink
    Definition Classes
    Object
  53. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  54. def valueOf(): Any

    Permalink
    Definition Classes
    Object
  55. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  56. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  57. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped