Skip to content

Conversation

@wanhongqing123
Copy link

@wanhongqing123 wanhongqing123 commented Nov 6, 2025

Description

Add audio stream category selection to microphone capture properties

Motivation and Context

  1. Different stream attributes will affect the final presentation of the acquired data. For example, AudioCategory_Communications is mainly used to acquire microphone data for communication effects, while AudioCategory_Speech is mainly used to acquire the stream for speech recognition effects. In speech recognition, the data in the microphone will automatically filter out the external sound captured by the microphone.
    Please See https://learn.microsoft.com/en-us/windows/win32/api/audiosessiontypes/ne-audiosessiontypes-audio_stream_category

  2. The AUDCLNT_STREAMOPTIONS property sets whether the audio stream will be processed by the system.

  1. Streams that support hardware offloading can significantly reduce CPU utilization.
    Please See https://learn.microsoft.com/en-us/windows-hardware/drivers/audio/hardware-offloaded-audio-processing

  2. This is helpful for Microphone output no longer works with Virtual Cable Microphone output no longer works with Virtual Cable #12571

The final appearance of the properties interface is as follows:
image

How Has This Been Tested?

I have tested it in my complute.

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@WizardCM
Copy link
Member

WizardCM commented Nov 6, 2025

In my opinion, this adds significant complexity for the user without any clear benefit. Additionally, most of these sound like they should be separate features. For example, I'd definitely be interested in considering hardware offloading on its own, and whether it even needs a toggle or can just be on by default.

@wanhongqing123
Copy link
Author

In my opinion, this adds significant complexity for the user without any clear benefit. Additionally, most of these sound like they should be separate features. For example, I'd definitely be interested in considering hardware offloading on its own, and whether it even needs a toggle or can just be on by default.

This disables some advanced configurations by default.
image

@Fenrirthviti
Copy link
Member

What problem is this actually solving? What workflows does this enable? What makes this worth us supporting as a feature?

This to me feels like someone found an API that was available, and implemented it because it was there and not because this solved any existing problems.

@wanhongqing123
Copy link
Author

What problem is this actually solving? What workflows does this enable? What makes this worth us supporting as a feature?

This to me feels like someone found an API that was available, and implemented it because it was there and not because this solved any existing problems.

Some systems may have issues with audio stream processing. In such cases, it can be helpful to have a configuration that allows you to disable the system's processing.

@wanhongqing123
Copy link
Author

What problem is this actually solving? What workflows does this enable? What makes this worth us supporting as a feature?

This to me feels like someone found an API that was available, and implemented it because it was there and not because this solved any existing problems.

  1. This is helpful for Microphone output no longer works with Virtual Cable Microphone output no longer works with Virtual Cable #12571

@WizardCM WizardCM added Windows Affects Windows New Feature New feature or plugin labels Nov 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

New Feature New feature or plugin Windows Affects Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants