Author Topic: elegant way to reset all joined channels of an ASIO device?  (Read 292 times)

MikeV

  • Posts: 181
During creation of ASIO channels all joined channels take over the settings of the master channel they are joined to, so, in my logic, resetting the master would reset all joined channels as well. Surprisingly this is not the case. So I need to keep a list of all channels I joined, and then reset them all one-by-one.

Is there a more elegant way to reset all joined channels of an ASIO device? Note the channel=-1 trick does not work as it will reset other groups of joined channels as well.

Ian @ un4seen

  • Administrator
  • Posts: 21017
There isn't currently any way to reset a group of joined channels in a single BASS_ASIO_ChannelReset call. I'll look into adding that option.

In the meantime, which settings are you looking to reset? A joined channel will use most of the settings (all except volume) from the 1st channel in the group rather than its own settings, but it won't copy the settings to its own. So when the channel is unjoined, it will still have its default settings, ie. no need to reset them.

MikeV

  • Posts: 181
I want to change which outputs I use to output a stream. E.g. when the stream changes from 8 channels to stereo or when I want to move a stream from outputs 1 & 2 to 3 & 4.

Ian @ un4seen

  • Administrator
  • Posts: 21017
I'm not really sure how BASS_ASIO_ChannelReset could help with that. Do you just want it to be able to unjoin a group of channels, eg. by passing it the 1st channel in the group? If you will possibly have multiple groups of joined channels on the same device, then it seems to me like you would need to keep track of which channels are in which group anyway, to be sure that they don't overlap.

MikeV

  • Posts: 181
As always our logic seems to differ.

Ian @ un4seen

  • Administrator
  • Posts: 21017
To clarify what you would like to happen, can you post what the BASSASIO call(s) would look like if they had the option(s) you want?

MikeV

  • Posts: 181
No change, see my original post. As you join channels like you build a tree, where the master is the trunk and all joined channels are its branches, I would expect the tree to fall (apart) when you cut down its trunk. I realise you don't want to change functionality to remain backwards compatible, but to me current behaviour is a bug that should be fixed.

If fixing the behaviour is not an option I guess a BASS_ASIO_RESET_JOINED flag could be added? It would unjoin all joined channels. For logic I would support any channel, not only the master, as the <channel> parameter.

My call would then look like

Code: [Select]
BASS_ASIO_ChannelReset(FALSE, 0, BASS_ASIO_RESET_JOINED);
where 0 is part of the group of joined channels I would like to unjoin (it happens to be the master, but I would not make that mandatory).

Ian @ un4seen

  • Administrator
  • Posts: 21017
I disagree. The other BASS_ASIO_ChannelXXX functions all apply to a single ASIO channel, so the logical thing is for BASS_ASIO_ChannelReset to do the same. Still, for convenience, here's an update that adds a BASS_ASIO_RESET_JOINED flag to also apply the reset to channels that are joined to the specified one:

   www.un4seen.com/stuff/bassasio.zip

For example, to unjoin any channels from the specified one, you would use the BASS_ASIO_RESET_JOINED and BASS_ASIO_RESET_JOIN flags together.

MikeV

  • Posts: 181
I fully agree, unless you un-join the master channel, then I don't agree.

Thanks for the added convenience!