This repository has been archived on 2020-04-21. You can view files and clone it, but cannot push or open issues or pull requests.
ludum-dare-46/docs/assets/js/sounds/soundcontext.js

27 lines
506 B
JavaScript

class SoundChannel{
/**
* Create a sound channel
* @param {number} max_queue_size Maximum number of sounds that can be queued before sounds are skipped
*/
constructor(max_queue_size) {
this.max_size = max_queue_size
}
}
class SoundContext{
constructor() {
// Define all sound channels
this.channels = {
bgm: new SoundChannel(2)
}
}
}
// The global context for sounds
let globalSoundContext = new SoundContext();