Skip to main content

Crate volumecontrol_core

Crate volumecontrol_core 

Source
Expand description

Core traits, errors, and shared types for the volumecontrol crate family.

This crate defines the AudioDevice trait and the AudioError and DeviceInfo types that are shared across all platform backends. It is not intended to be used directly; instead, depend on the volumecontrol crate, which selects the right backend automatically.

§Example

use volumecontrol_core::AudioError;

// `AudioError` is returned by all fallible operations across backends.
let err = AudioError::DeviceNotFound;
assert_eq!(err.to_string(), "audio device not found");

Structs§

DeviceInfo
Metadata for an available audio device returned by crate::AudioDevice::list.

Enums§

AudioError
Error type for all volumecontrol operations.

Traits§

AudioDevice
Common interface for audio device volume control.