pub struct Speaker<'d, D: Driver<'d>> {
pub stream: Stream<'d, D>,
pub feedback: Feedback<'d, D>,
pub control_monitor: ControlMonitor<'d>,
}Expand description
Implementation of the USB audio class 1.0.
Fields§
§stream: Stream<'d, D>Stream
feedback: Feedback<'d, D>Feedback
control_monitor: ControlMonitor<'d>Control Monitor
Implementations§
Source§impl<'d, D: Driver<'d>> Speaker<'d, D>
impl<'d, D: Driver<'d>> Speaker<'d, D>
Sourcepub fn new(
builder: &mut Builder<'d, D>,
state: &'d mut State<'d>,
config: Config<'d>,
) -> Self
pub fn new( builder: &mut Builder<'d, D>, state: &'d mut State<'d>, config: Config<'d>, ) -> Self
Creates a new Speaker device, split into a stream, feedback, and a control change notifier.
§Panics
If there is no sample rate or more than ten, no channel or more than
twelve, channels duplicated or out of wChannelConfig bit order, a
sample rate above 24 bits, max_packet_size above the 1024-byte
isochronous limit (1023 at full speed), a nonempty feature_unit without
one entry for the master and each audio channel, unsupported control
bits, or a too-small control_buf.
Auto Trait Implementations§
impl<'d, D> !RefUnwindSafe for Speaker<'d, D>
impl<'d, D> !UnwindSafe for Speaker<'d, D>
impl<'d, D> Freeze for Speaker<'d, D>
impl<'d, D> Send for Speaker<'d, D>
impl<'d, D> Sync for Speaker<'d, D>
impl<'d, D> Unpin for Speaker<'d, D>
impl<'d, D> UnsafeUnpin for Speaker<'d, D>
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