pub struct SharedAudio(/* private fields */);Expand description
A window’s handle to the session’s audio store — Core‘s audio
field. The process has one audio device, so the playbacks and the
command queue are the session’s and not this window’s: whichever
window’s driver drains the queue applies every window’s sounds. The
audio nodes’ mounts are per window inside it (see the module doc),
which is why the readers here take one.
Implementations§
Sourcepub fn take_commands(&self) -> Vec<AudioCommand>
pub fn take_commands(&self) -> Vec<AudioCommand>
Drains the commands queued since the last drain.
Sourcepub fn playback_of(&self, window: WindowId, key: Key) -> Option<PlaybackId>
pub fn playback_of(&self, window: WindowId, key: Key) -> Option<PlaybackId>
The playback a keyed audio node of window is running, if it is
mounted. Core::playback_of asks for the core’s own window.
Trait Implementations§
Auto Trait Implementations§
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more