Author Topic: Initialise DirectSound, WASAPI and ASIO from the same app  (Read 533 times)

Chris Oakley

  • Posts: 59
I'm wondering if it's possible in BASS.NET to initialise DirectSound, WASAPI and ASIO for input and output in the same application?

I'd like to stream to a multiple servers potentially from different audio sources on the machine but I'm struggling to keep the first connection alive when the next one connects.

Ian @ un4seen

  • Administrator
  • Posts: 21133
Yes, that should be fine. Do you want to use different devices via the different systems, or the same devices at the same time? If the latter, note that won't be possible when using exclusive mode WASAPI or some ASIO drivers.

BASS 2.4.13 will use WASAPI output by default. You can add the BASS_DEVICE_DSOUND flag to the BASS_Init call to use DirectSound instead.

Chris Oakley

  • Posts: 59
Thanks Ian. I wanted to be able to say cast one audio device via DirectSound and then cast another on WASAPI or ASIO to a different server from the same application. However, I did come across another potential pitfall.... DSP. I did manage to get it to do what I wanted, but when I tried to apply the DSP (in particular StereoTool) it would either lock, hang, crash or do nothing.

Tried all sorts, using different threads, mixers, the lot.

Ian @ un4seen

  • Administrator
  • Posts: 21133
How are you applying the DSP?

Regarding casting from multiple devices to multiple servers. Is that the only reason you want to use DirectSound/WASAPI/ASIO at the same time? If so, it shouldn't be necessary to do that. Have you tried using just standard BASS input and output, and had problems? If so, what sort of problems did you have? Check that you used BASS_SetDevice and BASS_RecordSetDevice to set the device context when needed.