Options
All
  • Public
  • Public/Protected
  • All
Menu

A thin wrapper around a Howl object with:

  • Handling of callbacks when the sound is not yet loaded.
  • Automatic clamping when calling setRate to ensure a valid value is passed to Howler.js.
  • Automatic clamping when calling setVolume so that the volume is always between 0 and 1.
memberof

gdjs

Hierarchy

  • HowlerSound

Index

Constructors

  • new HowlerSound(howl: Howl, volume: number, loop: boolean, rate: number): HowlerSound

Methods

  • fade(from: number, to: number, duration: number): HowlerSound
  • getLoop(): boolean
  • getMute(): boolean
  • getRate(): number
  • Get the sound playback rate. This 1 for the default speed. This value is not clamped (any value greater than 0 is valid), but the underlying audio system might not play the sound at the required rate if it's very low or very high.

    Returns number

  • getSeek(): number
  • getSpatialPosition(axis: "x" | "y" | "z"): number
  • getVolume(): number
  • isLoaded(): boolean
  • off(event: HowlEvent, handler: HowlCallback): HowlerSound
  • on(event: HowlEvent, handler: HowlCallback): HowlerSound
  • once(event: HowlEvent, handler: HowlCallback): HowlerSound
  • paused(): boolean
  • playing(): boolean
  • setSpatialPosition(x: number, y: number, z: number): HowlerSound
  • stopped(): boolean

Generated using TypeDoc