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

macOS asks for permission to use the microphone when accessing the default output device #901

Open
bash opened this issue Jul 19, 2024 · 1 comment

Comments

@bash
Copy link

bash commented Jul 19, 2024

When I run the following code from the terminal on macOS (using cargo run)

use cpal::traits::HostTrait as _;

fn main() {
    let _ = cpal::default_host().default_output_device();
}

I get a microphone permission prompt from macOS:

Screenshot 2024-07-19 at 20 40 58

If you want to reproduce this and the permission prompt does not appear you may have already granted or denied permissions to your terminal. You can easily reset them using tccutil. For example tccutil reset Microphone com.apple.Terminal for macOS' builtin terminal.

This issue was originally reported to Bevy: bevyengine/bevy#13989

I tested this on macOS Ventura (13.6.7).

@bash bash changed the title macOS asks for permission to use the microphone when macOS asks for permission to use the microphone when accessing the default output device Jul 19, 2024
@janhohenheim
Copy link

Note that this is currently resulting in most (all?) Bevy games on macOS asking for microphone permissions 😅
Are there some settings we can pass to cpal to work around this?

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