Skip to content

Fix alarm sound session activation failures in background#596

Open
bjorkert wants to merge 1 commit intodevfrom
fix/alarm-audio-session-activation
Open

Fix alarm sound session activation failures in background#596
bjorkert wants to merge 1 commit intodevfrom
fix/alarm-audio-session-activation

Conversation

@bjorkert
Copy link
Copy Markdown
Contributor

@bjorkert bjorkert commented Apr 9, 2026

Summary

Fixes #590Unable to play alarm: Session activation failed.

Use .duckOthers instead of empty options when configuring the audio session for alarm playback. The empty options created a non-mixable session that conflicted with the background silent audio player (which uses .mixWithOthers), causing setActive(true) to fail with "Session activation failed" when the app was in the background.

The change is applied to all five call sites in AlarmSound.swift where the audio session is reconfigured before playing an alarm.

Use .duckOthers instead of empty options when configuring the audio
session for alarm playback. The empty options created a non-mixable
session that conflicted with the background silent audio player
(which uses .mixWithOthers), causing setActive(true) to fail with
"Session activation failed" when the app was in the background.
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