Skip to content

Commit

Permalink
Add AsRef and AsMut impls for AudioUnit (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
ori-sky authored Aug 13, 2024
1 parent 1cfd70a commit 01ff207
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/audio_unit/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,18 @@ impl AudioUnit {
}
}

impl AsRef<sys::AudioUnit> for AudioUnit {
fn as_ref(&self) -> &sys::AudioUnit {
&self.instance
}
}

impl AsMut<sys::AudioUnit> for AudioUnit {
fn as_mut(&mut self) -> &mut sys::AudioUnit {
&mut self.instance
}
}

unsafe impl Send for AudioUnit {}

impl Drop for AudioUnit {
Expand Down

0 comments on commit 01ff207

Please sign in to comment.