Author Topic: How can I send an output device to a record channel for casting?  (Read 262 times)

Chris Oakley

  • Posts: 17
I bet this is really simple, but search as I might I can't figure out the way to do this.

I want to use Direct Sound for this, not WASAPI or ASIO - I've already managed to do those two.

I need to be able to get an output device and send it to a record channel for casting.

Most people would say use the StereoMix, but not all PC's have this option.

Any ideas would be brilliant :)

Chris

  • Posts: 1808
Hi every Soundcard will have via DirectSound "Steromix/What you here"   sometime its deactivated you muss activated it .

Second way can be to use wasapi via BASS_DEVICE_LOOPBACK




Chris Oakley

  • Posts: 17
Thanks Chris. I've sorted the WASAPI loopback, that was a piece of cake. What I was trying to achieve was doing a loopback in DirectSound as not all machines have Stereo-Mix or What I Hear.

After trawling the internet I found the answer on a German website. I couldn't read the language but the code was in English and I spotted this little config for BASS.NET:

Bass.BASS_SetConfig(CType(28, BASSConfig), 1)

This is in VB.NET but it activates an undocumented Loopback for Direct Sound. I'm pleased to say this has done exactly what I wanted so if anyone else is looking for an answer to this then hopefully this will be what you're after.

Ian @ un4seen

  • Administrator
  • Posts: 20393
That undocumented config option 28 is named BASS_CONFIG_REC_LOOPBACK and it is actually enabling WASAPI loopback recording with BASS, the same as you already have working with BASSWASAPI. So you may as well stick with the latter :)

If you're still interested in knowing more, here is where that option was introduced:

   www.un4seen.com/forum/?topic=8816.msg60868;topicseen#msg60868

Chris Oakley

  • Posts: 17
Ah. I'm a little confused. It's working for Direct Sound, I'm not using WASAPI on this. I understand what you're saying but is this affecting my app in some way then? By that I mean, despite me using all the commands for DS and not touching WASAPI will it be using WASAPI under the bonnet?

Ian @ un4seen

  • Administrator
  • Posts: 20393
Yes, the loopback recording devices enabled by the BASS_CONFIG_REC_LOOPBACK option will be using WASAPI (directly, not via BASSWASAPI). That means they won't be available on Windows XP and older (no WASAPI there).

Chris Oakley

  • Posts: 17
Right. I'm with you now. We don't support XP anyway for our software so that's not an issue. However, my curiosity is getting the better of me as there must be a way to do this in Direct Sound as I've seen other software using the Bass.dll that works on XP and they do this without a loop back.

Ian @ un4seen

  • Administrator
  • Posts: 20393
The other software that's working on XP is most likely recording from the soundcard's "Stereo Mix" or "What U Hear" input, or have you seen it working with a soundcard that doesn't have that input available?