Skip to content

Commit

Permalink
Merge pull request #308 from cormac-obrien/expose-playerror
Browse files Browse the repository at this point in the history
Document PlayError and expose in public API
  • Loading branch information
est31 committed Aug 5, 2020
2 parents 82b4952 + fb176a6 commit b376b91
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Expand Up @@ -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};
3 changes: 3 additions & 0 deletions src/stream.rs
Expand Up @@ -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,
}

Expand Down

0 comments on commit b376b91

Please sign in to comment.