Update docs for removal of the EventLoop
This commit is contained in:
parent
27245444a7
commit
f34a062fac
2 changed files with 93 additions and 79 deletions
|
|
@ -128,7 +128,16 @@ pub trait DeviceTrait {
|
|||
|
||||
/// A stream created from `Device`, with methods to control playback.
|
||||
pub trait StreamTrait {
|
||||
/// Run the stream.
|
||||
///
|
||||
/// Note: Not all platforms automatically run the stream upon creation, so it is important to
|
||||
/// call `play` after creation if it is expected that the stream should run immediately.
|
||||
fn play(&self) -> Result<(), PlayStreamError>;
|
||||
|
||||
/// Some devices support pausing the audio stream. This can be useful for saving energy in
|
||||
/// moments of silence.
|
||||
///
|
||||
/// Note: Not all devices support suspending the stream at the hardware level. This method may
|
||||
/// fail in these cases.
|
||||
fn pause(&self) -> Result<(), PauseStreamError>;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue