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

[Bug]: iOS app crashes when input channel count is set to 0 #1294

Closed
1 task done
aardvarkk opened this issue Oct 26, 2023 · 1 comment
Closed
1 task done

[Bug]: iOS app crashes when input channel count is set to 0 #1294

aardvarkk opened this issue Oct 26, 2023 · 1 comment

Comments

@aardvarkk
Copy link
Contributor

Detailed steps on how to reproduce the bug

  • Build a new Audio Application
  • In MainComponent, use setAudioChannels (0, 2);
  • Run on iOS device
  • App crashes when setting audio category with error -50

I will submit a PR with a fix.

What is the expected behaviour?

  • App should not crash

Operating systems

iOS

What versions of the operating systems?

16.6.1

Architectures

ARM, 64-bit

Stacktrace

No response

Plug-in formats (if applicable)

No response

Plug-in host applications (DAWs) (if applicable)

No response

Testing on the develop branch

I have not tested against the develop branch

Code of Conduct

  • I agree to follow the Code of Conduct
aardvarkk added a commit to aardvarkk/JUCE that referenced this issue Oct 26, 2023
https://developer.apple.com/documentation/avfaudio/avaudiosessioncategoryoptions/avaudiosessioncategoryoptionallowairplay

Apple's documentation states that "You can only explicitly set this option if the audio session’s category is set to AVAudioSessionCategoryPlayAndRecord."

Change the code so that it's only explicitly enabled in that specific category.
@tpoole
Copy link
Member

tpoole commented Oct 26, 2023

Thank you for reporting.

Fixed here: #1295 (comment)

@tpoole tpoole closed this as completed Oct 26, 2023
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

No branches or pull requests

2 participants