Provide default value for balance

This commit is contained in:
Jordan Eldredge 2019-02-26 07:32:48 -08:00
parent 182b4d0024
commit be22396af2

View file

@ -1,7 +1,7 @@
// The Web Audio API does not offer an easy way to make a stereo balance
// control. This is an attempt to fill that void, using an API similar to
// [StereoPannerNode](https://developer.mozilla.org/en-US/docs/Web/API/StereoPannerNode)
export default function StereoBalanceNode(context, options) {
export default function StereoBalanceNode(context, options = { balance: 0 }) {
let balance = 0;
// ChannelSplitterNode cannot be told to use a `channelInterperatation` of