win-asio: Add ASIO host for obs-studio - #12733
Conversation
b408fbf to
763a7f3
Compare
4c9de0e to
aa3d977
Compare
|
Update
|
44c4228 to
3c02361
Compare
|
Update 10-19-25 |
PatTheMav
left a comment
There was a problem hiding this comment.
I feel like I need to see the code "in action" to better gauge its correctness. I there something like an "ASIO virtual device" or something I can install in my VM and then use this plugin with it?
4e0365f to
60aa7f2
Compare
6b842cd to
4b17680
Compare
7228793 to
ca428b7
Compare
I guess my question is: why we can't just include |
The SDK asio.h can be used, but it requires either patching or adding compile definitions (via CMake) to get correct native types. But, in this specific case the cost seems disproportionate to what is actually being used. The host only needs a very small subset of ASIO definitions (roughly 130 lines of typedefs / enums / structs derived from the SDK header), and the implementation talks directly to the IASIO COM interface via its vtable. No SDK functions are used. Moving this through obs-deps would mean just for the sake of a single file:
That is a lot of extra infrastructure for a very small compatibility layer (130 lines out of 1080) that is already local, documented, and limited to the exact subset used by this plugin. So from a technical point of view, I still think the local asio-compat.h is the more proportionate solution here. It keeps the dependency surface minimal and explicit, without introducing additional build infrastructure or unused API surface. |
|
Update |
c660938 to
4b2a27b
Compare
658cc10 to
01b6b46
Compare
|
Update
|
|
Update (August 14, 2026)
|
This is more suited for use with audio buffers when one has concurrent threads. Signed-off-by: pkv <pkv@obsproject.com>
This adds: - an ASIO Input source, allowing audio capture of devices using Steinberg ASIO audio SDK on Windows. This allows low latency capture. - an ASIO output, which will allow routing audio from OBS to any ASIO device. A per channel routing is provided. The UI to setup the ASIO output is provided in a later commit. Signed-off-by: pkv <pkv@obsproject.com>
This adds an ASIO output entry in Tools Menu allowing to setup audio output from obs to an ASIO device. Signed-off-by: pkv <pkv@obsproject.com>
This adds a QPushButton to the Audio Settings on Windows. This triggers in turn a dedicated settings for the ASIO monitoring output. If no ASIO driver is detected in the system, the panel displays an explanatory message. The panel allows to: - select an ASIO monitoring device; - for each output channel of the ASIO device, one can select any channel from any of the 6 tracks. Signed-off-by: pkv <pkv@obsproject.com>
This adds a new raw audio callback for audio outputs where monitored sources are mixed. The audio ticks at 256 frames so about 5 ms at 48 kHz sample rate. This allows a much smaller latency than what is provided by the regular audio_callback which can buffer up to 960 ms (at 48 kHz). The main advantage against the low latency option which decreases the output latency to about 2 audio ticks (40 ms) is that this does not affect the regular audio pipeline and preserves the buffering which is essential for streams. The mixer is platform agnostic and can be used by any audio output. This is useful for ASIO which has no mixing capability, but even for WASAPI, CoreAudio or PulseAudio, this may allow in the future the creation of monitoring buses. With ASIO tests of the monitoring latency can be smaller than a video frame at 120 fps (so smaller than 8.3 ms with buffer 128, Yamaha driver) while WASAPI is in the range 30-50 ms. Signed-off-by: pkv <pkv@obsproject.com>
This adds support for the new raw audio output callback (raw_audio_monitoring) which provides mixed audio from all monitored sources. Signed-off-by: pkv <pkv@obsproject.com>
Due to circular buffer constraints, it is necessary to restart the output when a channel changes its source from an obs regular track to the new monitoring mix (or vice-versa). Signed-off-by: pkv <pkv@obsproject.com>
Currently the stinger is output on all tracks. When MONITOR_ONLY is picked, we explicitly set the mixers bitwise to 0 so that the audio never goes to outputs. Fix for a bug uncovered by MasterDalk when testing ASIO. Signed-off-by: pkv <pkv@obsproject.com>


Description
ASIO is a driver standard developed by Steinberg for low-latency audio. It is commonly used in pro audio.
It was unfortunately not possible for a long time to write a native ASIO host in obs because of license issues.
This has changed thanks to a partnership between the project and Yamaha Steinberg:
https://www.steinberg.net/press/2025/obs-collaboration/
The ASIO sdk is now released under dual licensing, including GPL v3 which is compatible with obs-studio.
Historical aside. When I got involved with obs coding, after working on surround sound support, my first plugin
endeavor was to write an asio source, which was developed eventually in collaboration with Andersama. It was a great learning experience. The ASIO sdk is notoriously tricky with lots of pitfalls for hosts and drivers alike. It was so daunting that at that time (early 2018) we relied on third-party libraries (RTAudio, Bassasio, portaudio) and now JUCE. The last incarnation of our asio plugin for obs (based on JUCE) was mostly coded by Andersama. It has been superseded in many ways by another third-party plugin based also on JUCE, atkaudio which has lot of capabilities but again relies on a third-party library. And anyway our ultimate goal had always been to add support for ASIO into obs.
This PR brings ASIO support in obs-studio natively: no third-party library is used but Steinberg SDK is leveraged directly.
For the host implementation, we have taken cues from JUCE ASIO host which documents a lot of pitfalls.
Our ASIO host provides:
The asio output in turn allows:
Technical note
The asio callback processes both audio from host to device and from device to host at the same time. The main difference with wasapi, is that any monitored audio sent to the device is not automatically mixed; it is the responsibility of the host to do the mixing. That is why asio can not be seamlessly integrated into libobs/audio-monitoring and that we resorted to creating an obs-output for asio.
This output is controlled through a frontend plugin which instead of adding an entry into the tool menu (as is customary) is callable from Settings > Audio alongside monitoring devices (wasapi on windows).
Screenshots:
ASIO source

ASIO source with channel selection

ASIO source with device selection

ASIO monitoring integrated to audio settings

ASIO monitoring panel

ASIO monitoring panel with track channel selection. Not the special monitoring track

Motivation and Context
ASIO brings the following advantages:
How Has This Been Tested?
Tested on windows 11 pro with several asio devices:
Testers are welcome to report their results with their interface and I'll update the list.
Types of changes
Checklist: