Add AsyncExecutor support to ProcessContext

This commit is contained in:
Robbert van der Helm
2022-10-22 01:15:16 +02:00
parent ec8e99cf44
commit 84f834abb6
27 changed files with 107 additions and 46 deletions

View File

@@ -177,7 +177,7 @@ impl Plugin for PolyModSynth {
&mut self,
buffer: &mut Buffer,
_aux: &mut AuxiliaryBuffers,
context: &mut impl ProcessContext,
context: &mut impl ProcessContext<Self>,
) -> ProcessStatus {
// NIH-plug has a block-splitting adapter for `Buffer`. While this works great for effect
// plugins, for polyphonic synths the block size should be `min(MAX_BLOCK_SIZE,
@@ -443,7 +443,7 @@ impl PolyModSynth {
/// voice will be stolen. Returns a reference to the new voice.
fn start_voice(
&mut self,
context: &mut impl ProcessContext,
context: &mut impl ProcessContext<Self>,
sample_offset: u32,
voice_id: Option<i32>,
channel: u8,
@@ -544,7 +544,7 @@ impl PolyModSynth {
/// matching voices.
fn choke_voices(
&mut self,
context: &mut impl ProcessContext,
context: &mut impl ProcessContext<Self>,
sample_offset: u32,
voice_id: Option<i32>,
channel: u8,