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

Added WASAPI exclusive host #843

Closed
wants to merge 1 commit into from

Conversation

jesnor
Copy link
Contributor

@jesnor jesnor commented Feb 21, 2024

In exclusive mode only one stream can be opened per device. This is different from the ASIO host which does its own mixing of multiple streams using the sample format of the device. I don't think this is a good idea because it can lead to audio artifacts like lack of precision and overflow. So it's better to let the application do the mixing, preferably using f32 or f64 samples which are then converted to the device sample format.

Also removed duplicated code in the WASAPI Device methods for creating input/output streams.

@Drewol Drewol mentioned this pull request Aug 4, 2024
71 tasks
@JerwuQu
Copy link

JerwuQu commented Nov 20, 2024

This is great! I have use for this in an application that requires low-latency audio.

Is there anything currently blocking this? (aside from merge conflicts)

@jesnor
Copy link
Contributor Author

jesnor commented Nov 21, 2024

This PR needs to updated and bug fixed. I could create a new PR later if there is interest in adding WASAPI exclusive to cpal.

@jesnor jesnor closed this Nov 21, 2024
@JerwuQu
Copy link

JerwuQu commented Nov 21, 2024

Given that there are two open issues #156 and #106 and external projects also waiting for this feature (like @Drewol above, and my own), I'd say there is interest.

I tried the latest version of this branch after rebasing on master, and it seems to have worked with output/speaker but not input/microphone (something about invalid stream format despite using a supposedly supported one), but maybe that's related to the bugs you mentioned.

Just tag me if you want help or testing with anything!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants