clarify docs about dropping stream

This commit is contained in:
Ilia 2024-07-05 21:47:07 +03:00
parent 3a23d2c529
commit 2427bde6cf

View file

@ -20,7 +20,8 @@
//! use std::io::BufReader;
//! use rodio::{Decoder, OutputStream, source::Source};
//!
//! // Get an output stream handle to the default physical sound device
//! // Get an output stream handle to the default physical sound device.
//! // Note that no sound will be played if _stream is dropped
//! let (_stream, stream_handle) = OutputStream::try_default().unwrap();
//! // Load a sound from a file, using a path relative to Cargo.toml
//! let file = BufReader::new(File::open("examples/music.ogg").unwrap());