mirror of
https://github.com/RustAudio/rodio
synced 2024-11-10 14:14:21 +00:00
Merge pull request #308 from cormac-obrien/expose-playerror
Document PlayError and expose in public API
This commit is contained in:
commit
b376b91e9e
2 changed files with 4 additions and 1 deletions
|
@ -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};
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue