Audio buffer views - #7945
Conversation
sakertooth
left a comment
There was a problem hiding this comment.
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.