From 202d6d8b02e276fe789dfcbb9bdbdfdbe211f5ad Mon Sep 17 00:00:00 2001 From: Eric Rosenbaum Date: Thu, 9 Nov 2017 16:28:03 -0500 Subject: [PATCH] =?UTF-8?q?Add=20a=20function=20to=20get=20an=20AudioPlaye?= =?UTF-8?q?r=E2=80=99s=20input=20node?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/index.js b/src/index.js index 087d250..c7a38e9 100644 --- a/src/index.js +++ b/src/index.js @@ -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