Add support for immutable frame abstractions #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First step towards #3
This adds the following traits:
UniformBuf
which allows for getting and iterating over frames.Frame
andFrameMut
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 asaudio::buf::Dynamic
. At the moment this is not being specifically leveraged andUniformBuf
might be merged intoBuf
.TODO
Channel access is still considered a bit too special in that its the "default" through
Buf::iter
andBuf::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.