BASS_ASIO - Problem "un-joining" channels.

Started by Ballinger,

Ballinger

I cannot seem to get BASS_ASIO_ChannelJoin to unjoin two successive channels. I can join them fine, but when I want to un-join two previously joined channels I always get an "Illegal parameter" error. Can anyone help with what I am doing wrong please?

Here is my code:

...
   SeedChannel := RecDeviceIndex * ChannelCount;
   BASS_ASIO_Stop;
   BASS_ASIO_ChannelReset(True, -1, BASS_ASIO_RESET_ENABLE);
   BASS_ASIO_ChannelEnable(True, SeedChannel, @ASIORecordingCallback, nil);
   if ChanCountCombo.ItemIndex = 1 then
      begin // stereo rec
      BASS_ASIO_ChannelJoin(True, SeedChannel + 1, SeedChannel);
      ErrorCode := BASS_ASIO_ErrorGetCode;
      end
   else
      begin // mono rec
      BASS_ASIO_ChannelJoin(True, SeedChannel + 1, -1);
      ErrorCode := BASS_ASIO_ErrorGetCode;
      end;
   BASS_ASIO_ChannelSetFormat(True, SeedChannel, Flags);
   // start the device
   if not BASS_ASIO_Start(ASIOInfo.bufmax, 0) then
      begin
...

Ian @ un4seen

Oops, it does look like BASS_ASIO_ChannelJoin currently isn't recognising the channel2=-1 parameter. Here's an update for you to try:

    www.un4seen.com/stuff/bassasio.zip

Btw, you can also remove all joins by adding BASS_ASIO_RESET_JOIN to the BASS_ASIO_ChannelReset call.

Ballinger

Ah... the global reset is probably the better way to go. That works... thanks for your help Ian.