From 53ce6a1229efd31ebed539757d949669a5964986 Mon Sep 17 00:00:00 2001 From: Keenan Tims Date: Tue, 25 Aug 2026 12:30:56 -0700 Subject: [PATCH] expose the AudioHandler from UsbAudioClass instance for access from the application --- src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 595790d..9b2656e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -999,6 +999,10 @@ impl<'a, B: UsbBus, AU: AudioHandler<'a, B> + ClockSource> UsbClass } impl<'a, B: UsbBus, AU: AudioHandler<'a, B> + ClockSource> UsbAudioClass<'a, B, AU> { + /// Expose the owned AudioHandler implementation + pub fn handler(&mut self) -> &mut AU { + self.audio_impl + } fn emit_feedback(&mut self) { if let Some(fb_ep) = self.feedback.as_ref() { if let Some(fb) = self.audio_impl.feedback(self.nominal_fb) {