zzfxM() now returns an array of buffers, one for the left speaker and one for the right. To compliment this change, zzfxP() now accepts an array of channels. If a single channel is passed it will play mono (compatibility with zzfx()).
zzfxM() also accepts a new optional panning argument. This is used to position each song channel in stereo space. For a 4 channel song you would pass [ch1,ch2,ch3,ch4], where ch{x} is a value between -1 and 1 - with 0 being the centre channel. For more info see the README.md, which details the implementation.
This PR adds support for stereo playback.
zzfxM()
now returns an array of buffers, one for the left speaker and one for the right. To compliment this change,zzfxP()
now accepts an array of channels. If a single channel is passed it will play mono (compatibility withzzfx()
).zzfxM()
also accepts a new optionalpanning
argument. This is used to position each song channel in stereo space. For a 4 channel song you would pass[ch1,ch2,ch3,ch4]
, wherech{x}
is a value between-1
and1
- with0
being the centre channel. For more info see the README.md, which details the implementation.