mirror of
https://github.com/RustAudio/rodio
synced 2024-12-12 21:22:36 +00:00
Add comment about Sink and OutputStream
This commit is contained in:
parent
a618afccf9
commit
934b1c0525
1 changed files with 4 additions and 1 deletions
|
@ -50,7 +50,8 @@
|
||||||
//! use std::time::Duration;
|
//! use std::time::Duration;
|
||||||
//! use rodio::{Decoder, OutputStream, Sink};
|
//! use rodio::{Decoder, OutputStream, Sink};
|
||||||
//! use rodio::source::{SineWave, Source};
|
//! use rodio::source::{SineWave, Source};
|
||||||
//!
|
//!
|
||||||
|
//! // _stream must live as long as the sink
|
||||||
//! let (_stream, stream_handle) = OutputStream::try_default().unwrap();
|
//! let (_stream, stream_handle) = OutputStream::try_default().unwrap();
|
||||||
//! let sink = Sink::try_new(&stream_handle).unwrap();
|
//! let sink = Sink::try_new(&stream_handle).unwrap();
|
||||||
//!
|
//!
|
||||||
|
@ -68,6 +69,8 @@
|
||||||
//! sounds to play simultaneously, you should create multiple [`Sink`]s.
|
//! sounds to play simultaneously, you should create multiple [`Sink`]s.
|
||||||
//!
|
//!
|
||||||
//! The [`Sink`] type also provides utilities such as playing/pausing or controlling the volume.
|
//! The [`Sink`] type also provides utilities such as playing/pausing or controlling the volume.
|
||||||
|
//!
|
||||||
|
//! **Please note that the [`Sink`] requires the [`OutputStream`], thus ensuring that it has to live as long as the sink.**
|
||||||
//!
|
//!
|
||||||
//! ## Filters
|
//! ## Filters
|
||||||
//!
|
//!
|
||||||
|
|
Loading…
Reference in a new issue