It seems this isn't currently available, or is it?
I see "Stream global volume level" is implemented as BASS_CONFIG_GVOL_STREAM, but it doesn't help.
I tried applying a DSP translated from your C code (found on bass.chm under "DSPPROC callback") into VB6 to the final mix. It crashes the IDE when I assign a value to pan in the main thread.
I tried embedding the writing and the reading of pan into a CriticalSection. The IDE still crashes.
I thought of locking the final mix channel (BASS_ChannelLock) during writing to pan, though I asumed lock isn't supported on the final mix. Surprisingly BASS_ChannelLock returned TRUE, but the IDE still crashes.
I though of implementing your C pan dsp code on a VC6 dll, as I did for other dsp functions in the past but I'm not confident on getting the CriticalSection right.
Any ideas?
Edit:
This is the draft of the code I wrote so far; it doesn't include a CriticalSection.
float pan; // panning position, set as you would the BASS_ATTRIB_PAN attribute
void CALLBACK PanDSP(HDSP handle, DWORD channel, void *buffer, DWORD length, void *user)
{
float *s = (float*)buffer;
if (!pan) return; // no processing neeeded for centre panning
for (; length; length -= 8, s += 2) {
if (pan < 0) s[1] = s[1] * (1 + pan); // pan left = reduce right
else s[0] = s[0] * (1 - pan); // vice versa
}
}
//Public Declare Sub jpSetPan Lib "jplib.dll" ()
void __stdcall jpSetPan(float NewPan)
{
pan=NewPan;
}
//Public Declare Function jpAddressOfPanDsp Lib "jplib.dll" () As Long
int __stdcall jpAddressOfPanDsp()
{
return((int)(PanDSP));
}