Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SoundManager: Set up AVAudioSession on iOS #12714

Merged
merged 1 commit into from
Feb 3, 2024

Conversation

fwcd
Copy link
Member

@fwcd fwcd commented Feb 2, 2024

Based on #12672

On iOS, audio apps should set up an AVAudioSession to tailor the OS behavior towards their use case (e.g. whether the app should interrupt other audio etc.) As explained in PortAudio/portaudio#881, this is currently not handled by PortAudio and likely doesn't fit into its API, since different apps will have different requirements that can't be handled by a "one-size-fits-all" initialization.

For Mixxx, I've set up the session in a way that it mixes with other apps1 and uses the standard playback mode.

Footnotes

  1. Not strictly necessary, but since we're mixing our own decks anyway, I see no downside in mixing with other apps too? Also, we wouldn't interrupt audio when launching Mixxx that way (an alternative would be to activate the audio session first upon playing a track, but that would likely require the AVAudioSession logic to be more deeply intertwined with other playback logic, which might not be desirable in order to keep platform-specific stuff isolated).

@github-actions github-actions bot added the build label Feb 2, 2024
@fwcd fwcd mentioned this pull request Feb 2, 2024
54 tasks
@fwcd fwcd marked this pull request as ready for review February 2, 2024 22:20
Copy link
Member

@daschuer daschuer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thank you.

@daschuer daschuer merged commit ad84046 into mixxxdj:main Feb 3, 2024
13 checks passed
@fwcd fwcd deleted the ios-avaudiosession branch February 3, 2024 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants