Crate default_device_sink

Crate default_device_sink 

Source
Expand description

A sink that automatically follows changes to the system’s default audio output device.

This crate provides DefaultDeviceSink, a wrapper around rodio::Sink that recreates the underlying stream and sink when the default output device changes. It also exposes helper functions for working with the selected device.

Structs§

DefaultDeviceSink
DefaultDeviceSink wraps a rodio::Sink and recreates the underlying stream and sink if the system default output device changes.

Statics§

SELECTED_OUTPUT_DEVICE
Globally selected output device name. None means use the system default.

Functions§

default_device_name
Returns the name of the current default output device, if any.
get_output_device
Returns the currently selected output device. None means the system default.
list_output_devices
Returns a list of available output device names.
set_output_device
Set the globally selected output device. Pass None to use the system default.