Add a function to get an AudioPlayer’s input node

This commit is contained in:
Eric Rosenbaum 2017-11-09 16:28:03 -05:00
parent 3cad765e76
commit 202d6d8b02

View file

@ -45,6 +45,14 @@ class AudioPlayer {
this.activeSoundPlayers = {}; this.activeSoundPlayers = {};
} }
/**
* Get this sprite's input node, so that other objects can route sound through it.
* @return {AudioNode} the AudioNode for this sprite's input
*/
getInputNode () {
return this.effectsNode;
}
/** /**
* Play a sound * Play a sound
* @param {string} soundId - the soundId id of a sound file * @param {string} soundId - the soundId id of a sound file