Options
All
  • Public
  • Public/Protected
  • All
Menu

HowlerSoundManager is used to manage the sounds and musics of a RuntimeScene.

It is basically a container to associate channels to sounds and keep a list of all sounds being played.

Hierarchy

  • HowlerSoundManager

Index

Methods

  • clampRate(rate: number): number
  • clearAll(): void
  • createHowlerSound(soundName: string, isMusic: boolean, volume: number, loop: boolean, rate: number): HowlerSound
  • Creates a new gdjs.HowlerSound using preloaded/cached Howl instances.

    Parameters

    • soundName: string

      The name of the file or resource to play.

    • isMusic: boolean

      True if a music, false if a sound.

    • volume: number

      Between 0 and 1.

    • loop: boolean

      True if it should be played looping.

    • rate: number

      speed at which it is played.

    Returns HowlerSound

  • dispose(): void
  • getGlobalVolume(): number
  • getResourceKinds(): ResourceKind[]
  • loadAudio(soundName: string, isMusic: boolean): void
  • loadResource(resourceName: string): Promise<void>
  • playMusic(soundName: string, loop: boolean, volume: number, pitch: number): void
  • playMusicOnChannel(soundName: string, channel: number, loop: boolean, volume: number, pitch: number): void
  • playSound(soundName: string, loop: boolean, volume: number, pitch: number): void
  • playSoundOnChannel(soundName: string, channel: number, loop: boolean, volume: number, pitch: number): void
  • processResource(resourceName: string): Promise<void>
  • setGlobalVolume(volume: number): void
  • unloadAll(): void
  • unloadAudio(soundName: string, isMusic: boolean): void

Constructors

Generated using TypeDoc