Skip to content

Conversation

@pkviet
Copy link
Member

@pkviet pkviet commented Oct 30, 2025

Description

Also modifies win-wasapi, linux-pulseaudio, mac-capture.
This adds comparison to default devices to the monitoring deduplication.
When a user picks a default device, the device_id setting is 'default', which prevents any comparison if the monitoring_id is not 'default'.
On macOS, there is the additional difficulty that 'default' is not the same for 'Desktop Audio' and for 'monitoring';
indeed the coreaudio API admits no pure audio output capture (audio is paired with video in SCK or through virtual audio devices like Blackhole or the antique Soundflower). The devices list therefore differ for 'monitoring' and 'Desktop Audio'.

We fix this by using the libobs/audio_monitoring devices_match function which already cover the case of 'default' devices.
For macOS, we use a newly introduced get_desktop_default_id function, which allows to resolve the 'default' device to
a regular id and to use the devices_match function.

Motivation and Context

Fix a bug uncovered by @Warchamp7 .
Later on, this monitoring deduplication will allow the addition of a headphone button in the mixer UI since there will not be any level variation when the user turns on and off 'monitoring'.

How Has This Been Tested?

Checked the monitoring deduplication is triggered even with 'default' devices for either 'Desktop Audio' or 'monitoring' on the platforms : windows 11 pro 25H2, macOS 26.0, ubuntu 24.04.
On macOS, BlackHole 2ch was used as desktop audio.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

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.

@pkviet pkviet added Bug Fix Non-breaking change which fixes an issue Seeking Testers Build artifacts on CI labels Oct 30, 2025
@pkviet pkviet requested a review from Warchamp7 October 30, 2025 23:17
@pkviet pkviet added this to the OBS Studio 32.0 milestone Oct 30, 2025
This allows retrieval of the default audio output capture device.

Signed-off-by: pkv <[email protected]>
This adds comparison to default devices to the monitoring deduplication.
When a user picks a default device, the device_id setting is 'default',
which prevents any comparison.
The comparison is done by leveraging the libobs/audio-monitoring
devices_match function.
For macOS, some special care is taken because the devices list differ
for 'Desktop Audio' and 'monitoring' since coreaudio sdk has no pure
audio capture; so 'default' in the two lists do not match in general.
One then retrieves the device_id for the default desktop audio for macOS
through get_desktop_default_id function.

Signed-off-by: pkv <[email protected]>
@pkviet pkviet force-pushed the deduperedux2 branch 3 times, most recently from 128430d to 051817c Compare October 31, 2025 02:48
@RytoEX RytoEX requested a review from PatTheMav October 31, 2025 16:54
@RytoEX RytoEX self-assigned this Oct 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Fix Non-breaking change which fixes an issue Seeking Testers Build artifacts on CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants