Skip to content

Panic on Android when enumerating devices using CPAL #43

Closed
@torokati44

Description

@torokati44

I'm trying to enumerate the available devices on Android using this code, through CPAL:

        let host = cpal::default_host();

        if let Ok(dev) = host.devices() {
            for dev in dev {
                log::warn!("DEVICE: {:?}", dev.name());
            }
        }

When running on a Pixel 4a 5G, I get this panic:

thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', /home/attila/.cargo/registry/src/github.tiyicn.workers.dev-1ecc6299db9ec823/oboe-0.4.5/src/java_interface/devices_info.rs:64:18

cc: ruffle-rs/ruffle-android#4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions