Author Topic: No distinction between ASIO input & output devices?  (Read 109 times)

MikeV

  • Posts: 174
Unlike WASAPI where you use BASS_GetDeviceInfo if you want to generate a list of output devices and BASS_RecordGetDeviceInfo for input devices, ASIO just seems to have BASS_ASIO_GetDeviceInfo. Does this mean ASIO devices always support both input and output, i.e. are fully bidirectional?

saga

  • Posts: 2212
Re: No distinction between ASIO input & output devices?
« Reply #1 on: 2 Feb '18 - 16:32 »
I think BASS_ASIO_GetInfo should give you that info. In general (i.e. not a BASS limitation), it is not statically known for an ASIO driver how many active input and output channels it has until you instanciated it.

MikeV

  • Posts: 174
Re: No distinction between ASIO input & output devices?
« Reply #2 on: 2 Feb '18 - 19:30 »
Not what I remember seeing in the demo (forgot its name but it lists available output devices). If that code is wrong, maybe my question should just be how to get a list of ASIO input and output devices.

saga

  • Posts: 2212
Re: No distinction between ASIO input & output devices?
« Reply #3 on: 2 Feb '18 - 22:04 »
The only way is to instanciate the driver, then query its inputs and outputs and then close it again. That's most likely what the demo you mention does, just quickly opening and closing all drivers one after another.
An ASIO driver won't tell you how many input our output channels it has until you open it, so if you do not want to open it, you can only assume that it has both inputs and outputs. In particular, this also means that if another application is already using the driver, you cannot figure out how many inputs and outputs it has, because only one application at a time can open the driver. There is no "off-line" channel information that an application could query instead.

MikeV

  • Posts: 174
Re: No distinction between ASIO input & output devices?
« Reply #4 on: 3 Feb '18 - 08:11 »
Not saying that, I open the driver and query it according to the demo program.

MikeV

  • Posts: 174
Re: No distinction between ASIO input & output devices?
« Reply #5 on: 3 Feb '18 - 11:10 »
Looks like I got confused by BASS's naming convention, not the first time.. Things get even more confusing for me when switching back & forth between WASAPI and ASIO.

My original post should have read BASS_ASIO_GetDeviceInfo, this was a simple typo. However I now see the example from which I started working (speakers.c) clearly shows BASS_ASIO_ChannelGetInfo to get the I/O distinction during enumeration, no idea how I missed that. I'm not sure if it is possible to use BASS_ASIO_GetInfo as you suggested, as it would require the channels to be number continuous and starting from zero. Not sure if that is a safe assumption.

Thanks for the clarification!