Author Topic: Clone "mixed" stream to another output device ?  (Read 4973 times)

Couin

  • Posts: 124
Re: Clone "mixed" stream to another output device ?
« Reply #75 on: 8 Aug '24 - 06:18 »
Hi Ian,

Thanks for precisions :)

So, with SL3 : CTRL C gives 5 or 6 repeats of last datas. Any key (excepted Spacebar), gives me only one repeat of last playing data.
No repeat with ASIO4ALL.

I have to integrate he DLL and option in the app to see if it will repeat the last sound data (even if playback is finished) or not.

Couin

  • Posts: 124
Re: Clone "mixed" stream to another output device ?
« Reply #76 on: 11 Aug '24 - 05:34 »
Hi again,

I added the option in the .bas file, like this:

' BASS_ASIO_Init flags
Code: [Select]
Global Const BASS_ASIO_THREAD = 1 ' host driver in dedicated thread
Global Const BASS_ASIO_JOINORDER = 2 ' order joined channels by when they were joined
Global Const BASS_ASIO_ALLOUTPUTS = 16  ' pre-enable all output channels
Global Const BASS_ASIO_ALLINPUTS = 8  ' pre-enable all input channels
and replaced the .dll by your last provided.

Here is the code in the dropdown list (ComboBox) :
Code: [Select]
Call BASS_ASIO_ChannelEnable(BASSFALSE, ASIOChanOut, 0, 0) 'disable old channels
ASIOChanOut = cmbASIOChanOut.ListIndex
Call BASS_ASIO_ChannelEnableBASS(BASSFALSE, ASIOChanOut, MixerMain, BASSTRUE)

It's OK when I open the dropdown list and click on channels I want, but if I scroll with the mousewheel, I sometimes get speed stuttering on "old channels". SO I tested with adding a small pause:
Code: [Select]
Call BASS_ASIO_ChannelEnable(BASSFALSE, ASIOChanOut, 0, 0) 'disable old channels
hb_sleep (50)
ASIOChanOut = cmbASIOChanOut.ListIndex
Call BASS_ASIO_ChannelEnableBASS(BASSFALSE, ASIOChanOut, MixerMain, BASSTRUE)
and it looks no more stuttering  :P

I also added the disable old channels and hb_sleep line before freeing the device on exit software, and it does not repeat the last data if audio was playing.

Now, I have to manage ASIO inputs, I would send the input to a splitter (and splitted streams to each Main and Aux mixers). I'm digging in the examples but I did not foudn what I search yet lol

Ian @ un4seen

  • Administrator
  • Posts: 26035
Re: Clone "mixed" stream to another output device ?
« Reply #77 on: 12 Aug '24 - 16:57 »
It's OK when I open the dropdown list and click on channels I want, but if I scroll with the mousewheel, I sometimes get speed stuttering on "old channels". SO I tested with adding a small pause:
Code: [Select]
Call BASS_ASIO_ChannelEnable(BASSFALSE, ASIOChanOut, 0, 0) 'disable old channels
hb_sleep (50)
ASIOChanOut = cmbASIOChanOut.ListIndex
Call BASS_ASIO_ChannelEnableBASS(BASSFALSE, ASIOChanOut, MixerMain, BASSTRUE)
and it looks no more stuttering  :P

Are you getting constant stuttering like before, or is it just briefly while switching channels? Seems strange that the sleep would help with the former, but I guess it might help with the latter by just slowing down how quickly you can change channels. Does moving the sleep to after (instead of before) BASS_ASIO_ChannelEnableBASS have the same effect?

Now, I have to manage ASIO inputs, I would send the input to a splitter (and splitted streams to each Main and Aux mixers). I'm digging in the examples but I did not foudn what I search yet lol

If you would like to use BASS_ASIO_ChannelEnableBASS with ASIO input channel(s), then the BASS channel in that call will need to be a "push" stream created with BASS_StreamCreate (proc=STREAMPROC_PUSH), which will receive the data from the ASIO channel(s).

Couin

  • Posts: 124
Re: Clone "mixed" stream to another output device ?
« Reply #78 on: 13 Aug '24 - 15:38 »
Hi Ian,

Without the hb_sleep(50) call, it was stuttering faster than previous DLL (that has not ALLOUTPUTS flag). I recorded with my phone, what id does when changing channel while playing, then back to previous channels (playing again normaly) and changed again), you could hear the amount of repeated datas is smaller so repeat is faster.

Thanks for STREAMPROC_PUSH method, I have to see how it works, I tried to use it be no input sound is sent to mixer lol