-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
See ircam-ismm/node-web-audio-api#159
Let's benchmark changing
pub struct AudioRenderQuantum {
channels: ArrayVec<AudioRenderQuantumChannel, MAX_CHANNELS>,
...
To
pub struct AudioRenderQuantum {
channels: SmallVec<[AudioRenderQuantumChannel; 2]>, // 2, or 4, 5, 8 or any other well known channel count
SmallVec will spill to the heap if the initial capacity is exceeded. So buffers with channel count < X will be put on the stack, larger ones on the heap. This will hurt our allocation-free-rendering but it will effectively remove the limit on the number of channels.
Some more usage of MAX_CHANNELS or assert_valid_number_of_channels should be reviewed. The io abstractions and some nodes use it.
Metadata
Metadata
Assignees
Labels
No labels