-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Audio buffer views #7945
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
Audio buffer views #7945
Conversation
sakertooth
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall nice job, the transition to use this PR in #7858 was almost seamless.
|
The PR is fine with me, you can merge on your own terms. |
|
Oh yeah, I also thought about something: Do we care for sample rate support? |
Maybe that could be handled separately, at least for now |
I am thinking of a situation where we have an audio source (e.g., If I need this for some reason though I can add it, I am just going through a couple more designs for the PR. |
|
I think I'd prefer if the buffer views didn't store that information, since most places where I use them the sample rate isn't needed, so it would just waste space. |
Yeah I was thinking about this. Most of the time it won't be needed so it should be handled separately on a case by case basis. |
Adds two non-owning views for audio buffers: `InterleavedBufferView` and `PlanarBufferView`. The channel count can be specified at either compile-time or runtime. Specifying at compile-time provides both performance and space optimizations. The way this works is the same as `std::span` except this uses the new `DynamicChannelCount` constant rather than `std::dynamic_extent`.
Adds two non-owning views for audio buffers:
InterleavedBufferViewandPlanarBufferView.The channel count can be specified at either compile-time or runtime. Specifying at compile-time provides both performance and space optimizations. The way this works is the same as
std::spanexcept this uses the newDynamicChannelCountconstant rather thanstd::dynamic_extent.These are not used for anything yet, but will be used in #7459 and #7858.