Methods
Static clampRate
- clampRate(rate: number): number
createHowlerSound
- createHowlerSound(soundName: string, isMusic: boolean, volume: number, loop: boolean, rate: number): HowlerSound
Parameters
soundName: string
isMusic: boolean
volume: number
loop: boolean
rate: number
getGlobalVolume
- getGlobalVolume(): number
loadAudio
- loadAudio(soundName: string, isMusic: boolean): void
Parameters
soundName: string
isMusic: boolean
Returns void
playMusic
- playMusic(soundName: string, loop: boolean, volume: number, pitch: number): void
Parameters
soundName: string
loop: boolean
volume: number
pitch: number
Returns void
playMusicOnChannel
- playMusicOnChannel(soundName: string, channel: number, loop: boolean, volume: number, pitch: number): void
Parameters
soundName: string
channel: number
loop: boolean
volume: number
pitch: number
Returns void
playSound
- playSound(soundName: string, loop: boolean, volume: number, pitch: number): void
Parameters
soundName: string
loop: boolean
volume: number
pitch: number
Returns void
playSoundOnChannel
- playSoundOnChannel(soundName: string, channel: number, loop: boolean, volume: number, pitch: number): void
Parameters
soundName: string
channel: number
loop: boolean
volume: number
pitch: number
Returns void
preloadAudio
- preloadAudio(onProgress: (loadedCount: number, totalCount: number) => void, onComplete: (totalCount: number) => void, resources?: ResourceData[]): void
Parameters
onProgress: (loadedCount: number, totalCount: number) => void
- (loadedCount: number, totalCount: number): void
Parameters
loadedCount: number
totalCount: number
Returns void
onComplete: (totalCount: number) => void
- (totalCount: number): void
Optional resources: ResourceData[]
Returns void
setGlobalVolume
- setGlobalVolume(volume: number): void
setResources
- setResources(resources: ResourceData[]): void
Parameters
resources: ResourceData[]
Returns void
unloadAudio
- unloadAudio(soundName: string, isMusic: boolean): void
Parameters
soundName: string
isMusic: boolean
Returns void
Constructors
constructor
Parameters
resources: ResourceData[]
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.