How to write an ASIO driver

Hello! I would like my device to be compatible with ASIO, so I try writing ASIO driver. I used driver example from SDK as the base from here https://www.steinberg.net/developers/. Managed to build project to get .dll and register it in the system. In foobar2000 new driver can be seen. When it is chosen as output, audio stream is being played back, but no sound can be heared. I have read SDK documentation, but do not understand what exactly I should change / add and where.

Can someone help with ASIO driver or advise something?
 
There is information on how to get error messages from ASIO4ALL. Have you tried that using the developer interface?

Reason I ask as is that writing a true ASIO driver from scratch would probably require a lot of reading and a lot work, some of which would probably involve trial and error experiments. Besides, only reason for needing ASIO instead of WASAPI Exclusive Mode is if support for Native DSD is required. WASAPI Exclusive supports DSD by way of DoP.
 
Last edited:
OTOH, if you already have an ASIO kernal mode driver and you want to debug it to see why it isn't working, then Microsoft has info on doing that in one of the links above.

Its kind of the same as with if you design and or build some circuit and find it doesn't work. More or less the same thing here. You have figure it out which may require some troubleshooting.
 
You are trying to write a full-blown UAC2 driver with ASIO interface? That's quite a goal, even MS hired specialists from Thesycon for that.

IIUC Asio4All does not use any of the direct access options to the driver, and goes through the windows audio layer. As that you get all the limitations (fixed and limited samplerate, resampling, etc.).

If your device works with MS UAC2 driver, have you checked FlexASIO in wasapi exclusive mode? I do not think FlexASIO has any built-in limits as it uses Portaudio for the wasapi access.
 
You are trying to write a full-blown UAC2 driver with ASIO interface?
No, just want to have separate output ASIO option working up to 384 kHz in the foobar output list. And I have it, but it does not work :)
If your device works with MS UAC2 driver, have you checked FlexASIO in wasapi exclusive mode?
With MS UAC2 driver everything is fine, the device works up to 384 kHz. I did not manage to get the device working with FlexASIO.
 
Why do you need the ASIO when wasapi exclusive works OK for your device? Foobar has a wasapi exclusive plugin.

If you really need ASIO, IMO FlexASIO will work, you just need to configure it properly. Either using the GUI configurator (a separate project IIRC) or via its config file.
 
Maybe to make things a little more clear, a useful diagram from FlexASIO documentation:
1686620496386.png

For bit perfect audio, Windows Audio Service should be avoided.
 
  • Like
Reactions: 1 user