Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DirectSound backend doesn't work with Synchronous Audio Router (SAR) #176

Open
dechamps opened this issue Jan 11, 2023 · 2 comments
Open
Labels
asiohost Relates to a specific ASIO Host Application. bug

Comments

@dechamps
Copy link
Owner

dechamps commented Jan 11, 2023

When using FlexASIO 1.9 as the backend of Synchronous Audio Router 0.13.1, the default backend (DirectSound) doesn't seem to work if Windows audio devices are set up in SAR - the stream appears to deadlock.

It does seem to work fine if the WASAPI backend is used. It also seems to work if no audio devices are set up in SAR, but that's obviously not useful, and the audio is choppy.

This likely has something to do with SAR setting up its own WDM audio devices while DirectSound is starting.

@dechamps dechamps added bug asiohost Relates to a specific ASIO Host Application. labels Jan 11, 2023
@dechamps dechamps pinned this issue Jan 11, 2023
@dechamps dechamps unpinned this issue Jan 20, 2023
@dechamps
Copy link
Owner Author

dechamps commented Feb 2, 2023

Investigation note: a (completely undocumented) way to make SAR log is to set the SAR_ASIO_LOG environment variable to 1: https://github.com/eiz/SynchronousAudioRouter/blob/d77615f811f9dd897c69996397d62406d4f0ea32/SarAsio/dllmain.cpp#L33-L43

The logs can then be found in %appdata%\SynchronousAudioRouter\logs.

@dechamps
Copy link
Owner Author

dechamps commented Feb 3, 2023

When the stream starts, it looks like buffer switches happen for the first ~1 second or so, and then they stop firing. (This seems oddly similar to the #29 failure mode, but the buffer size SAR uses - 10 ms - should not be large enough to trigger #29.) Meanwhile the entire Windows audio engine seems wedged, with other audio devices and other audio apps becoming nonfunctional until the stream is stopped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
asiohost Relates to a specific ASIO Host Application. bug
Projects
None yet
Development

No branches or pull requests

1 participant