Author Topic: differense between using BASSWASAPI API and regular BASS API  (Read 741 times)

jakob

  • Posts: 113
Hi
I was wondering what the benefits or drawbacks are between using BASSWASAPI  and the regular BASS API, to record and play audio.

Ian @ un4seen

  • Administrator
  • Posts: 21861
Since BASS got built-in WASAPI support, BASSWASAPI is only really needed for exclusive mode output. It can also be useful for device notifications (via BASS_WASAPI_SetNotify). Another reason to use BASSWASAPI currently is for loopback recording. BASS does actually include support for that too but it has never been documented (BASSWASAPI was preferred). That feature is being improved (with resampling support) and will be documented in the BASS 2.4.14 release.

jakob

  • Posts: 113
thank you for the answer. I am currently trying to make loopback recording and it is working as long as i am setting the device =-3. Is it possible to change the device that is mapped to the loopback?

Ian @ un4seen

  • Administrator
  • Posts: 21861
Yes, you can record from any output device. You need to search the device list (using BASS_WASAPI_GetDeviceInfo) for the loopback device that corresponds to the output device that you want to record from, which you can then use in your BASS_WASAPI_Init call. A loopback device can be identified by it having the BASS_DEVICE_LOOPBACK flag set. A loopback device always immediately follows its corresponding output device in the list, so you can just search for the output device and add 1 to its number.

If you would like to quickly confirm what devices are available, you can run the pre-compiled LIST.EXE example that's included in the BASSWASAPI package (C\BIN folder).

Radiov

  • Posts: 4
Since BASS got built-in WASAPI support, BASSWASAPI is only really needed for exclusive mode output. It can also be useful for device notifications (via BASS_WASAPI_SetNotify). Another reason to use BASSWASAPI currently is for loopback recording. BASS does actually include support for that too but it has never been documented (BASSWASAPI was preferred). That feature is being improved (with resampling support) and will be documented in the BASS 2.4.14 release.

Hello, Ian. Please, do you have any date target to release that new version? I am developing a new project and really would like to use new features as you described. :-)

Ian @ un4seen

  • Administrator
  • Posts: 21861
BASS 2.4.14 should be released very soon. Perhaps even before Christmas, or otherwise soon after. If you would like to start using the loopback recording feature now, here's the latest build that you can use in the meantime:

   www.un4seen.com/stuff/bass.zip

Loopback devices are included in the recording device list (from BASS_RecordGetDeviceInfo) and can be identified by having the BASS_DEVICE_LOOPBACK flag set. The corresponding output device can be identified by having the same "driver" value in the output device list. Loopback devices don't have a volume control but the BASS_FX_VOLUME effect can be used (via BASS_ChannelSetFX) to implement that if needed.

Radiov

  • Posts: 4
BASS 2.4.14 should be released very soon. Perhaps even before Christmas, or otherwise soon after. If you would like to start using the loopback recording feature now, here's the latest build that you can use in the meantime:
....

Great, Ian. Works like a charm! Thanks a lot.

But now I am facing a type of time limit while recording from loopback devices (if it is playing). The application always stops after 144 secs of capture. If I use a loopback without audio playing on it or if I use a microphone input there are no limit.
Any idea, please.

Ian @ un4seen

  • Administrator
  • Posts: 21861
That's strange. I don't seem to be able to reproduce that here. Please see if you can reproduce it with the pre-compiled RECTEST.EXE example from the BASS or BASSenc packages (C\BIN folders). Also confirm what Windows version you're using.