feat(coreaudio): add macOS system audio permission helpers#1124
Open
thewh1teagle wants to merge 1 commit intoRustAudio:masterfrom
Open
feat(coreaudio): add macOS system audio permission helpers#1124thewh1teagle wants to merge 1 commit intoRustAudio:masterfrom
thewh1teagle wants to merge 1 commit intoRustAudio:masterfrom
Conversation
94bbe7e to
b262f4e
Compare
b262f4e to
cfeaede
Compare
Contributor
|
I think it might be better if we check permission when recording from an output device, and if we don't have it, request it. Do you think it's better? cc @roderickvd If you agree, I can file a PR agains your branch! |
Author
|
Feel free to create a PR against my branch or open another PR with me as a co-author :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I was using cpal 0.18.0 (master) for loopback recording on macOS and needed to check and request the
System Audio Recordingpermission before recording. Without it, recording succeeds butcaptures only silence.
Added three public functions on macOS:
cpal::check_system_audio_permission()— silent check, no UIcpal::request_system_audio_permission()— shows system prompt, blockingcpal::open_system_audio_settings()— opens Privacy & Security > System Audio RecordingUses the private TCC framework (
kTCCServiceAudioCapture) vialibloading.block2andobjc2-core-foundationwere already transitive dependencies so no significant dep overhead.Related