You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Implement Frame generically over arbitrary N channels #179
Currently, the Frame trait is only implemented for [S; N] where S: Sample for N = 1-32. While realistically more than sufficient, it makes it difficult for dependent code to be generic over Frames of arbitrary N.
error[E0277]: the trait bound `[f32; CHANNELS]: Frame` is not satisfied
--> examples/bleh.rs:13:22
|
13 | do_something(&self.buffer)
| ------------ ^^^^^^^^^^^^ the trait `Frame` is not implemented for `[f32; CHANNELS]`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `Frame`:
[S; 10]
[S; 11]
[S; 12]
[S; 13]
[S; 14]
[S; 15]
[S; 16]
[S; 17]
and 24 others
note: required by a bound in `do_something`
--> examples/bleh.rs:3:26
|
3 | fn do_something(f: &impl Frame) {
| ^^^^^ required by this bound in `do_something`
For more information about this error, try `rustc --explain E0277`.
For example, this is currently blocking a cleanup of generics in the ebur128 crate. I managed to clean up some of the code, but got stuck with the larger cleanup, partly due to missing generic implementations of Frame
changed the title [-]Implementt Frame generically over arbitrary N channels[/-][+]Implement Frame generically over arbitrary N channels[/+]on Nov 15, 2022
Activity
[-]Generic implementations of Frame over N channels[/-][+]Implementt Frame generically over arbitrary N channels[/+]rawler commentedon Nov 5, 2022
For example, this is currently blocking a cleanup of generics in the
ebur128crate. I managed to clean up some of the code, but got stuck with the larger cleanup, partly due to missing generic implementations ofFrame[-]Implementt Frame generically over arbitrary N channels[/-][+]Implement Frame generically over arbitrary N channels[/+]