Merge pull request #64 from LLK/feature/get-audioplayer-input-node

Add a function to get an AudioPlayer’s input node
This commit is contained in:
Eric Rosenbaum 2017-11-14 18:50:53 -05:00 committed by GitHub
commit eb27dcd03a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -45,6 +45,14 @@ class AudioPlayer {
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
* @param {string} soundId - the soundId id of a sound file