Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace NodeBufferRef #16

Open
ErikNatanael opened this issue Mar 7, 2023 · 1 comment
Open

Replace NodeBufferRef #16

ErikNatanael opened this issue Mar 7, 2023 · 1 comment

Comments

@ErikNatanael
Copy link
Owner

NodeBufferRef is a workaround around the fact that it is currently not possible, in safe stable Rust, to make a &mut [f32] into a &mut [&mut [f32]]. It would be cleaner if &mut [&mut [f32]] could be passed to a Gen's process function.

When stable, as_chunks_mut together with a lot of generics could be a solution. Currently, it is not encoded at compile time how many channels of input or output data a Gen expects.

@ErikNatanael
Copy link
Owner Author

Using the impl_gen macro, you can let the macro generate any code that deals with NodeBufferRef and refer only to &mut [f32]s directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant