Skip to content

Commit

Permalink
Merge pull request #505 from orottier/feature/param-keys
Browse files Browse the repository at this point in the history
Expose AudioParamValues.keys iterator for convenience
  • Loading branch information
orottier authored May 6, 2024
2 parents 50f26fa + f134836 commit 5df8d11
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/worklet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ impl<'a> AudioParamValues<'a> {
let id = self.map.get(name).unwrap();
self.values.get(id)
}

pub fn keys(&self) -> impl Iterator<Item = &str> {
self.map.keys().map(|s| s.as_ref())
}
}

/// Audio processing code that runs on the audio rendering thread.
Expand Down

0 comments on commit 5df8d11

Please sign in to comment.