nandi/jolt-nativepublic Fork 0
cfd3e3677bed92e80cfe447469a249cfdc0b1401
Commits
Clone
git clone https://git.rickub.com/nandi/jolt-native.git
git clone ssh://git@rickub.com/nandi/jolt-native.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Lift freeq's AV media plane out of sleek 90f8b89 · on cfd3e3677bed92e80cfe447469a249cfdc0b1401 · nandi · 19d ago
enumerate.rs · 36 lines · 688 BRust Blame HistoryRaw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
use std::vec::IntoIter as VecIntoIter;

use super::Device;

pub use crate::iter::{SupportedInputConfigs, SupportedOutputConfigs};

// TODO: Support enumerating earpiece vs headset vs speaker etc?
pub struct Devices(VecIntoIter<Device>);

impl Devices {
    pub fn new() -> Self {
        Self::default()
    }
}

impl Default for Devices {
    fn default() -> Devices {
        Devices(vec![Device].into_iter())
    }
}

impl Iterator for Devices {
    type Item = Device;

    fn next(&mut self) -> Option<Device> {
        self.0.next()
    }
}

pub fn default_input_device() -> Option<Device> {
    Some(Device)
}

pub fn default_output_device() -> Option<Device> {
    Some(Device)
}