One way you could achieve what you want is to feed the data into a "push" stream and use a splitter stream to extract & encode the first 2 channels from it. It could look something like this...
encstream=BASS_StreamCreate(freq, chans, BASS_SAMPLE_FLOAT|BASS_STREAM_DECODE, STREAMPROC_PUSH, NULL); // create a push stream with same sample format as the mixer
int chanmap[]={0, 1, -1}; // channel mapping for first 2 channels
encsplit=BASS_Split_StreamCreate(encstream, BASS_STREAM_DECODE, chanmap); // create a splitter to extract first 2 channels for the encoder
BASS_Encode_Start(encsplit, ...); // set an encoder on it
...
DWORD CALLBACK AsioProc(BOOL input, DWORD channel, void *buffer, DWORD length, void *user)
{
DWORD c=BASS_ChannelGetData(mixer, buffer, length); // get some data from the mixer for the ASIO output
if (c==(DWORD)-1) c=0; // an error, no data
else {
BASS_StreamPutData(encstream, buffer, c); // feed the data to the encoding stream
BYTE temp[20000]; // processing buffer
while (BASS_ChannelGetData(encsplit, temp, sizeof(temp))) ; // process the data (extract first 2 channels and encode it)
}
return c;
}