Update lib docs to allow for testing on devices with no audio

This commit is contained in:
mitchmindtree 2019-06-21 15:57:15 +02:00
parent 61c3520d70
commit 2667547a9c
1 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@
//! `default_*_device()` functions return an `Option` in case no device is available for that //! `default_*_device()` functions return an `Option` in case no device is available for that
//! stream type on the system. //! stream type on the system.
//! //!
//! ``` //! ```no_run
//! let device = cpal::default_output_device().expect("no output device available"); //! let device = cpal::default_output_device().expect("no output device available");
//! ``` //! ```
//! //!
@ -60,10 +60,10 @@
//! //!
//! Now we must start the stream. This is done with the `play_stream()` method on the event loop. //! Now we must start the stream. This is done with the `play_stream()` method on the event loop.
//! //!
//! ``` //! ```no_run
//! # let event_loop: cpal::EventLoop = return; //! # let event_loop: cpal::EventLoop = return;
//! # let stream_id: cpal::StreamId = return; //! # let stream_id: cpal::StreamId = return;
//! event_loop.play_stream(stream_id); //! event_loop.play_stream(stream_id).expect("failed to play_stream");
//! ``` //! ```
//! //!
//! Now everything is ready! We call `run()` on the `event_loop` to begin processing. //! Now everything is ready! We call `run()` on the `event_loop` to begin processing.