mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-22 01:34:21 +00:00
Adapt the max capacity of AudioFormatWriter::writeFromFloatArrays
Currently this operation is limited and asserts if the incoming audio buffer has more than 255 channels. Since `chans` is a vector, it seems straightforward to adapt its size and support any value of `numSourceChannels`. This will also spare the creation of 256 int pointers when buffers of less than 255 channels are written.
This commit is contained in:
parent
1fc0de32c8
commit
d15fa8f0e3
1 changed files with 1 additions and 1 deletions
|
|
@ -157,7 +157,7 @@ bool AudioFormatWriter::writeFromFloatArrays (const float* const* channels, int
|
|||
if (isFloatingPoint())
|
||||
return write ((const int**) channels, numSamples);
|
||||
|
||||
std::vector<int*> chans (256);
|
||||
std::vector<int*> chans (numSourceChannels + 1);
|
||||
std::vector<int> scratch (4096);
|
||||
|
||||
jassert (numSourceChannels < (int) chans.size());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue