Skip to main content

NullBackend

Struct NullBackend 

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

Null бэкенд - не производит реального аудио ввода-вывода

Implementations§

Source§

impl NullBackend

Source

pub fn new(config: AudioConfig) -> Self

Создать новый Null бэкенд

Trait Implementations§

Source§

impl AudioBackend for NullBackend

Source§

fn backend_type(&self) -> BackendType

Получить тип бэкенда
Source§

fn config(&self) -> &AudioConfig

Получить конфигурацию
Source§

fn config_mut(&mut self) -> &mut AudioConfig

Получить мутабельную конфигурацию
Source§

fn init(&mut self) -> IoResult<()>

Инициализировать бэкенд
Source§

fn start(&mut self) -> IoResult<()>

Запустить обработку
Source§

fn stop(&mut self) -> IoResult<()>

Остановить обработку
Source§

fn read(&mut self, buffer: &mut [f32]) -> IoResult<usize>

Прочитать данные из входного потока
Source§

fn write(&mut self, buffer: &[f32]) -> IoResult<usize>

Записать данные в выходной поток
Source§

fn xruns(&self) -> u32

Количество пропущенных семплов (xruns)
Source§

fn latency(&self) -> Duration

Текущая задержка
Source§

fn list_input_devices(&self) -> Vec<String>

Получить список доступных входных устройств
Source§

fn list_output_devices(&self) -> Vec<String>

Получить список доступных выходных устройств
Source§

impl Debug for NullBackend

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. 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<S> FromSample<S> for S

Source§

fn from_sample_(s: S) -> S

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> ToSample<U> for T
where U: FromSample<T>,

Source§

fn to_sample_(self) -> U

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.
Source§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,