Skip to content

Be generic over both Input and Output sample types #74

Closed
@mitchmindtree

Description

@mitchmindtree

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).

  • Rather than taking B where B DspBuffer<O>, O: OutputSample, audio_received should take Vec<I> where I: InputSample
  • This means our trait should probably be 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions