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

wasapi: Speed up enumerate_devices by caching default device IDs for each flow/role instead of requerying for every wasapi_create_device. #682

Merged
merged 1 commit into from
Jan 7, 2022

Conversation

kinetiknz
Copy link
Collaborator

@kinetiknz kinetiknz commented Jan 5, 2022

Locally (on a i9-9900KS with ~60 input/~60 output devices), this reduces a single enumerate_devices call from ~1100ms to ~250ms.

…each flow/role instead of requerying for every wasapi_create_device.

Locally (on a machine with ~120 devices), this reduces a single
enumerate_devices call from ~1100ms to ~250ms.
@kinetiknz kinetiknz requested a review from padenot January 5, 2022 06:16
@kinetiknz kinetiknz self-assigned this Jan 5, 2022
Copy link
Collaborator

@padenot padenot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

@kinetiknz kinetiknz merged commit 3d598ef into master Jan 7, 2022
@kinetiknz kinetiknz deleted the wasapi_speed_up_enum branch January 7, 2022 01:35
mutexlox-signal added a commit to mutexlox-signal/cubeb that referenced this pull request Aug 30, 2024
Prior to mozilla#682,
a device could be default for all of
MULTIMEDIA, NOTIFICATION, and
VOICE.

After that PR, the first two were
mutually exclusive with the third, I
believe unintentionally.

Restore this behavior so that, e.g.,
on devices with only one output device,
querying for the "voice" device returns
that device.
padenot pushed a commit that referenced this pull request Sep 6, 2024
Prior to #682,
a device could be default for all of
MULTIMEDIA, NOTIFICATION, and
VOICE.

After that PR, the first two were
mutually exclusive with the third, I
believe unintentionally.

Restore this behavior so that, e.g.,
on devices with only one output device,
querying for the "voice" device returns
that device.
padenot pushed a commit to padenot/cubeb that referenced this pull request Feb 13, 2025
Prior to mozilla#682,
a device could be default for all of
MULTIMEDIA, NOTIFICATION, and
VOICE.

After that PR, the first two were
mutually exclusive with the third, I
believe unintentionally.

Restore this behavior so that, e.g.,
on devices with only one output device,
querying for the "voice" device returns
that device.
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