Skip to main content

DeviceCatalog

Struct DeviceCatalog 

Source
pub struct DeviceCatalog { /* private fields */ }
Expand description

Registry of stream-device providers.

Implementations§

Source§

impl DeviceCatalog

Source

pub fn new() -> Self

Builds an empty device catalog.

Source

pub fn default_modeled() -> Self

Builds a catalog with deterministic modeled MIDI and audio providers.

Source

pub fn with_registry_audio_devices(registry: &Registry) -> Self

Builds a modeled catalog plus audio sites exported by loaded libs.

Source

pub fn register(&mut self, provider: Box<dyn DeviceProvider>)

Registers a device provider.

Source

pub fn register_provider_sites(&mut self, router: &AudioRouter)

Adds a snapshot of the audio sites currently registered by a provider.

Source

pub fn register_registry_audio_devices(&mut self, registry: &Registry)

Adds audio-site records currently owned by loaded registry libs.

Source

pub fn enumerate(&self) -> Result<Vec<DeviceRecord>>

Enumerates every registered provider.

Source

pub fn open_checked( &self, cx: &mut Cx, id: &Symbol, ) -> Result<Box<dyn StreamEvalSite>>

Opens a cataloged stream evaluation site by device id after checking authority and recording the declared device effects.

Source

pub fn open(&self, id: &Symbol) -> Result<Box<dyn StreamEvalSite>>

Opens a cataloged stream evaluation site by device id through the provider-level compatibility dispatch path.

Runtime and public host opens should use Self::open_checked so the catalog row’s authority and device effects are handled first.

Source

pub fn open_live_checked( &self, cx: &mut Cx, id: &Symbol, ) -> Result<MidiLiveEvalSite>

Opens a cataloged MIDI device as a live MIDI evaluation site after checking authority and recording the declared device effects.

Source

pub fn open_live(&self, id: &Symbol) -> Result<MidiLiveEvalSite>

Opens a cataloged MIDI device as a live MIDI evaluation site through the compatibility dispatch path.

Runtime and public host opens should use Self::open_live_checked so the catalog row’s authority and device effects are handled first.

Source

pub fn enumerate_midi(&self) -> Result<Vec<DeviceRecord>>

Enumerates MIDI device rows.

Source

pub fn enumerate_audio(&self) -> Result<Vec<DeviceRecord>>

Enumerates audio device rows.

Source

pub fn audio_backend_names(&self) -> Result<Vec<String>>

Returns safe audio backend candidate names from catalog records.

Hardware records contribute their transport name. Modeled records keep the deterministic modeled fallback as the final candidate.

Source

pub fn midi_backend_names(&self) -> Result<Vec<String>>

Returns safe MIDI backend candidate names from catalog records.

Hardware records contribute their transport name. Modeled records keep the deterministic modeled fallback as the final candidate.

Source

pub fn audio_hardware_backend_names(&self) -> Result<Vec<String>>

Returns audio backend candidate names for real hardware only.

Source

pub fn midi_hardware_backend_names(&self) -> Result<Vec<String>>

Returns MIDI backend candidate names for real hardware only.

Trait Implementations§

Source§

impl Default for DeviceCatalog

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.