Skip to content

fix(audio): a software host keeps a volume set before its audio output exists (AE#660) - #663

Merged
superuser404notfound merged 1 commit into
mainfrom
fix/660-sw-volume
Sep 27, 2026
Merged

superuser404notfound merged 1 commit into
mainfrom
fix/660-sw-volume

Conversation

@superuser404notfound

Copy link
Copy Markdown
Owner

Refs #660.

The engine applies its stored volume to a new host right after building it (applyDesiredVolume), before load(). SoftwarePlaybackHost and AudioPlaybackHost forwarded that write only to their AudioOutput, which load() creates later, so it was lost and every software (dav1d / FFmpeg audio) session started at full volume. The getter also reported 1.0 in that window, so AetherEngine.volume lied too.

Both hosts now keep the volume as their own stored property and apply it to every AudioOutput they build. The native hosts were never affected (AVPlayer.volume exists from construction).

Tests: Issue660SoftwareVolumeTests (both hosts keep a pre-load volume; an AudioPlaybackHost loaded from a WAV fixture plays at it). Red before the fix, green after. Full swift test: 646 XCTest + 3563 swift-testing, 0 failures.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Mf4MXgM9bqugHoe5TW4BYf

…t exists (AE#660)

The engine hands its stored volume to a freshly built host right away,
before load() runs. SoftwarePlaybackHost and AudioPlaybackHost only
forwarded it to their AudioOutput, which load() builds later, so the
write was dropped and every software session started at full volume.
The getter also reported 1.0 in that window.

Both hosts now hold the volume themselves and hand it to each output
they build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mf4MXgM9bqugHoe5TW4BYf
@superuser404notfound
superuser404notfound merged commit a60d5a4 into main Sep 27, 2026
7 checks passed
@superuser404notfound
superuser404notfound deleted the fix/660-sw-volume branch September 30, 2026 21:22
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.

1 participant