Author Topic: pan in mixer output  (Read 182 times)

MikeV

  • Posts: 147
pan in mixer output
« on: 26 Apr '17 - 13:11 »
How do I add pan (not balance!) in mixer output? I know (for mysterious reasons) like volume it is not supported but can be added manually by manipulating the samples. What I do not know is the proper algorithm, taking into account amplification when going off the zero point.

Ian @ un4seen

  • Administrator
  • Posts: 20389
Re: pan in mixer output
« Reply #1 on: 26 Apr '17 - 16:23 »
You mention "not balance". Does that mean you want the mixer's left channel sound to move to the right channel when panning right, and vice versa? If so, that would probably need to be implemented in a DSP function set on the mixer via BASS_ChannelSetDSP.

MikeV

  • Posts: 147
Re: pan in mixer output
« Reply #2 on: 26 Apr '17 - 19:32 »
Please see https://en.m.wikipedia.org/wiki/Panning_(audio) for the definition of pan vs balance. Did some quick tests and it looks like Bass's pan is actually a balance function?

Ian @ un4seen

  • Administrator
  • Posts: 20389
Re: pan in mixer output
« Reply #3 on: 27 Apr '17 - 14:08 »
BASS_ChannelSetAttribute with BASS_ATTRIB_PAN translates to a IDirectSoundBuffer8::SetPan call (on Windows), which is indeed a balance control.

   https://msdn.microsoft.com/en-us/library/microsoft.directx_sdk.idirectsoundbuffer8.idirectsoundbuffer8.setpan.aspx