Skip to content
New issue

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

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

Already on GitHub? # to your account

Add support for immutable frame abstractions #5

Merged
merged 6 commits into from
Oct 10, 2022
Merged

Add support for immutable frame abstractions #5

merged 6 commits into from
Oct 10, 2022

Conversation

udoprog
Copy link
Owner

@udoprog udoprog commented Oct 10, 2022

First step towards #3

This adds the following traits:

  • UniformBuf which allows for getting and iterating over frames.
  • Frame and FrameMut which allows for access samples within a frame.

The name UniformBuf currently stems from how frame access presupposes that each channel in the audio buffer has a uniform number of samples. That means it currently won't be implemented for types which have variable channels such as audio::buf::Dynamic. At the moment this is not being specifically leveraged and UniformBuf might be merged into Buf.

TODO

Channel access is still considered a bit too special in that its the "default" through Buf::iter and Buf::get and the like. This will be renamed but would constitute a large change. Or we keep it as is, but then we need to determine whether channel of frame access should be the default.

@udoprog udoprog added the enhancement New feature or request label Oct 10, 2022
@udoprog udoprog merged commit 14e13ab into main Oct 10, 2022
@udoprog udoprog deleted the frame branch October 10, 2022 02:50
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant