Module stream

Source
Expand description

Output audio via the OS via mixers or play directly

This module provides a builder that’s used to configure and open audio output. Once opened sources can be mixed into the output via OutputStream::mixer.

There is also a convenience function play for using that output mixer to play a single sound.

Structs§

OutputStream
cpal::Stream container. Use mixer() method to control output.
OutputStreamBuilder
Convenience builder for audio output stream. It provides methods to configure several parameters of the audio output and opening default device. See examples for use-cases.
OutputStreamConfig
Describes the output stream’s configuration

Enums§

PlayError
An error occurred while attempting to play a sound.
StreamError
Errors that might occur when interfacing with audio output.

Functions§

play
A convenience function. Plays a sound once. Returns a Sink that can be used to control the sound.
supported_output_configs
Return all formats supported by the device.