Skip to content

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

@tautropfli

Description

@tautropfli

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).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions