-
Notifications
You must be signed in to change notification settings - Fork 18
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
Be generic over both Input and Output sample types #74
Comments
I'm going to have a go at using the feature gated associated types, just to see how far I get... |
Didn't get very far at all! I'll change it over to |
One day... the associated types will prevail! :P |
This was implemented (I accidently pushed it straight to the repo) |
@bvssvni this just landed! https://github.com/rust-lang/rust/blob/ce4318ad86f2ccd0710247020269ba0ba22c6d59/src/test/run-pass/assoc-eq.rs Might have another go at this tonight |
This is exciting! |
This has been implemented and the abstraction has it's own crate. |
It looks like we're about to hit the classic use-case for associated types!
I just realised there are a couple changes that need to be made to the Node's
audio_received
method (not included in the test example).B where B DspBuffer<O>, O: OutputSample
,audio_received
should takeVec<I> where I: InputSample
Node<B, I, O> where B: DspBuffer<O>, I: InputSample, O: OutputSample
The amount of type parameters will likely get very frustrating very quickly, but we'll be able to clean up nicely once associated types land.
The text was updated successfully, but these errors were encountered: