Skip to content

Instantly share code, notes, and snippets.

@piedoom
Created June 8, 2017 23:54
Show Gist options
  • Select an option

  • Save piedoom/e2dbc09da5e78381c9a76d74ff167483 to your computer and use it in GitHub Desktop.

Select an option

Save piedoom/e2dbc09da5e78381c9a76d74ff167483 to your computer and use it in GitHub Desktop.
impl ExPlugin {
fn process_one_channel<F: Float + AsPrim>(&mut self, input: &[F], output: &mut [F]) {
for (input_sample, output_sample) in input.iter().zip(output) {
*output_sample = rand::random::<f64>() as F
// error, non-scalar cast
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment