-
Notifications
You must be signed in to change notification settings - Fork 0
Sound
Harsh Singh edited this page Jan 13, 2024
·
6 revisions
Params
- arrayBuffer - sound to play
- time {number} - time to skip and play from
- loop {boolean} - loop the sound
- gainNode
Bottlecap.Sound.play(assets.sound.bgm, 0, true, soundMixer);
Params
- gainNode
- volume {number} - 1 - full volume 0 - mute
Bottlecap.Sound.setVolume(.5, soundMixer);
Params
- source - sound
- time {number} - time to wait
const source = Bottlecap.Sound.play(assets.sound.bgm, 0, true, soundMixer);
Bottlecap.Sound.stop(source);