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§
- Output
Stream cpal::Stream
container. Usemixer()
method to control output.- Output
Stream Builder - 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.
- Output
Stream Config - Describes the output stream’s configuration
Enums§
- Play
Error - An error occurred while attempting to play a sound.
- Stream
Error - 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.