hex/src/audio/recording_environment
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Dax f070dcffc7
fix lower audio on outputs with partial channel volume controls (#1916)
* fix(audio): lower outputs that lack volume on every channel

macOS ducking needed all of an output's stream channels to have a settable
volume scalar, so a USB adapter reporting four channels with controls on only
the first two was left unchanged, silently. Ramp only the channels that can be
set, then fall back to the main volume and the virtual main volume Mute uses,
and warn when the output has no controllable volume at all.

fixes #1915

* fix(audio): keep a read-only channel's balance when lowering

A channel that can be read but not set used to be dropped from the ramp, which
left a settable channel beside it lopsided, and a plain main volume write could
flatten a balance that cannot be restored. Such a channel now sends the whole
output to the virtual main volume, which macOS keeps balanced; the main volume
is a fallback only when no channel reports a volume at all. The warning for an
output with nothing to lower now says which failure it saw and includes the
device id when there is one.

* fix(audio): keep an unreadable volume from making the ramp lopsided

AudioObjectHasProperty now decides whether a channel has a volume scalar at
all; a property that exists but cannot be read, or returns an invalid value,
counts as read-only, so lowering still goes to the virtual main volume instead
of skipping the channel and ramping only the ones beside it. The warning for an
output with nothing to lower now also covers an unreadable stream layout.
2026-11-16 15:12:32 -05:00
..
ducking.rs fix lower audio on outputs with partial channel volume controls (#1916) 2026-11-16 15:12:32 -05:00