mirror of
https://github.com/RustAudio/rodio
synced 2024-11-10 06:04:16 +00:00
Merge pull request #575 from senlizishi/document
Add comment about Sink and OutputStream
This commit is contained in:
commit
149443717f
1 changed files with 3 additions and 0 deletions
|
@ -51,6 +51,7 @@
|
|||
//! use rodio::{Decoder, OutputStream, Sink};
|
||||
//! use rodio::source::{SineWave, Source};
|
||||
//!
|
||||
//! // _stream must live as long as the sink
|
||||
//! let (_stream, stream_handle) = OutputStream::try_default().unwrap();
|
||||
//! let sink = Sink::try_new(&stream_handle).unwrap();
|
||||
//!
|
||||
|
@ -69,6 +70,8 @@
|
|||
//!
|
||||
//! The [`Sink`] type also provides utilities such as playing/pausing or controlling the volume.
|
||||
//!
|
||||
//! **Please note that the [`Sink`] requires the [`OutputStream`], make sure that the outputstream is not dropped before the sink.**
|
||||
//!
|
||||
//! ## Filters
|
||||
//!
|
||||
//! The [`Source`] trait provides various filters, similar to the standard [`Iterator`] trait.
|
||||
|
|
Loading…
Reference in a new issue