macro_rules! sesh_plugin {
($fn_name:ident) => { ... };
}Expand description
Define a Sesh audio plugin.
Generates the required WASM exports: sesh_sdk_version, sesh_alloc,
sesh_free, and sesh_process.
The process function receives a slice of channels. Each inner slice is one
channel of audio samples laid out as contiguous non-interleaved:
[L0..Ln, R0..Rn, ...].
ยงExample
use sesh_sdk::sesh_plugin;
fn process(channels: &mut [&mut [f32]]) {
for channel in channels.iter_mut() {
for sample in channel.iter_mut() {
*sample *= 0.5; // simple gain reduction
}
}
}
sesh_plugin!(process);