diff --git a/src/lib.rs b/src/lib.rs index 82e9704..3e77220 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -104,4 +104,4 @@ pub use crate::decoder::Decoder; pub use crate::sink::Sink; pub use crate::source::Source; pub use crate::spatial_sink::SpatialSink; -pub use crate::stream::{OutputStream, OutputStreamHandle, StreamError}; +pub use crate::stream::{OutputStream, OutputStreamHandle, PlayError, StreamError}; diff --git a/src/stream.rs b/src/stream.rs index 5a52ac0..69461b9 100644 --- a/src/stream.rs +++ b/src/stream.rs @@ -70,9 +70,12 @@ impl OutputStreamHandle { } } +/// An error occurred while attemping to play a sound. #[derive(Debug)] pub enum PlayError { + /// Attempting to decode the audio failed. DecoderError(decoder::DecoderError), + /// The output device was lost. NoDevice, }