1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

DSP: Update convolution

This commit is contained in:
reuk 2020-04-24 10:50:46 +01:00
parent 2c81da73f9
commit fca3429e6e
No known key found for this signature in database
GPG key ID: 9ADCD339CFC98A11
48 changed files with 3692 additions and 1830 deletions

View file

@ -4,6 +4,40 @@ JUCE breaking changes
Develop
=======
Change
------
The Convolution class interface was changed:
- `loadImpulseResponse` member functions now take `enum class` parameters
instead of `bool`.
- `copyAndLoadImpulseResponseFromBlock` and
`copyAndLoadImpulseResponseFromBuffer` were replaced by a new
`loadImpulseResponse` overload.
Possible Issues
---------------
Code using the old interface will no longer compile, and will need to be
updated.
Workaround
----------
Code that was previously loading impulse responses from binary data or from
files can substitute old `bool` parameters with the newer `enum class`
equivalents. Code that was previously passing buffers or blocks will need
reworking so that the Convolution instance can take ownership of the buffer
containing the impulse response.
Rationale
---------
The newer `enum class` parameters make user code much more readable, e.g.
`loadImpulseResponse (file, Stereo::yes, Trim::yes, 0, Normalise::yes)` rather
than `loadImpulseResponse (file, true, true, 0, true);`. By taking ownership of
the passed buffer, the Convolution can avoid preallocating a large internal
buffer, reducing memory usage when short impulse responses are used. Changing
the ownership semantics of the buffer also makes it easier for users to avoid
copies/allocations on the audio thread, and gives more flexibility to the
implementation to run initialisation tasks on a background thread.
Change
------
All references to ROLI Ltd. (ROLI) have been changed to Raw Material Software

View file

@ -66,6 +66,15 @@ struct ConvolutionDemoDSP
void process (ProcessContextReplacing<float> context)
{
context.isBypassed = bypass;
// Load a new IR if there's one available. Note that this doesn't lock or allocate!
if (auto buffer = bufferTransfer.get())
convolution.loadImpulseResponse (std::move (buffer->buffer),
buffer->sampleRate,
Convolution::Stereo::yes,
Convolution::Trim::yes,
Convolution::Normalise::yes);
convolution.process (context);
}
@ -76,8 +85,14 @@ struct ConvolutionDemoDSP
void updateParameters()
{
if (auto* cabinetTypeParameter = dynamic_cast<ChoiceParameter*> (parameters[0]))
auto* cabinetTypeParameter = dynamic_cast<ChoiceParameter*> (parameters[0]);
if (cabinetTypeParameter == nullptr)
{
jassertfalse;
return;
}
if (cabinetTypeParameter->getCurrentSelectedID() == 1)
{
bypass = true;
@ -86,29 +101,74 @@ struct ConvolutionDemoDSP
{
bypass = false;
auto maxSize = static_cast<size_t> (roundToInt (sampleRate * (8192.0 / 44100.0)));
auto selectedType = cabinetTypeParameter->getCurrentSelectedID();
auto assetName = (selectedType == 2 ? "guitar_amp.wav" : "cassette_recorder.wav");
if (auto assetInputStream = createAssetInputStream (assetName))
{
currentCabinetData.reset();
assetInputStream->readIntoMemoryBlock (currentCabinetData);
auto assetInputStream = createAssetInputStream (assetName);
convolution.loadImpulseResponse (currentCabinetData.getData(), currentCabinetData.getSize(),
false, true, maxSize);
if (assetInputStream == nullptr)
{
jassertfalse;
return;
}
AudioFormatManager manager;
manager.registerBasicFormats();
std::unique_ptr<AudioFormatReader> reader { manager.createReaderFor (std::move (assetInputStream)) };
if (reader == nullptr)
{
jassertfalse;
return;
}
AudioBuffer<float> buffer (static_cast<int> (reader->numChannels),
static_cast<int> (reader->lengthInSamples));
reader->read (buffer.getArrayOfWritePointers(), buffer.getNumChannels(), 0, buffer.getNumSamples());
bufferTransfer.set (std::make_unique<BufferWithSampleRate> (std::move (buffer),
reader->sampleRate));
}
}
//==============================================================================
struct BufferWithSampleRate
{
BufferWithSampleRate (AudioBuffer<float>&& bufferIn, double sampleRateIn)
: buffer (std::move (bufferIn)), sampleRate (sampleRateIn) {}
AudioBuffer<float> buffer;
double sampleRate = 0.0;
};
class BufferTransfer
{
public:
void set (std::unique_ptr<BufferWithSampleRate> p)
{
const SpinLock::ScopedLockType lock (mutex);
ptr = std::move (p);
}
std::unique_ptr<BufferWithSampleRate> get()
{
const SpinLock::ScopedTryLockType lock (mutex);
return lock.isLocked() ? std::move (ptr) : nullptr;
}
private:
std::unique_ptr<BufferWithSampleRate> ptr;
SpinLock mutex;
};
double sampleRate = 0.0;
bool bypass = false;
MemoryBlock currentCabinetData;
Convolution convolution;
BufferTransfer bufferTransfer;
ChoiceParameter cabinetParam { { "Bypass", "Guitar amplifier 8''", "Cassette recorder" }, 1, "Cabinet Type" };
std::vector<DSPDemoParameterBase*> parameters { &cabinetParam };

View file

@ -828,6 +828,8 @@ add_library( ${BINARY_NAME}
"../../../../../modules/juce_core/maths/juce_Random.h"
"../../../../../modules/juce_core/maths/juce_Range.h"
"../../../../../modules/juce_core/maths/juce_StatisticsAccumulator.h"
"../../../../../modules/juce_core/memory/juce_AllocationHooks.cpp"
"../../../../../modules/juce_core/memory/juce_AllocationHooks.h"
"../../../../../modules/juce_core/memory/juce_Atomic.h"
"../../../../../modules/juce_core/memory/juce_ByteOrder.h"
"../../../../../modules/juce_core/memory/juce_ContainerDeletePolicy.h"
@ -1048,6 +1050,8 @@ add_library( ${BINARY_NAME}
"../../../../../modules/juce_data_structures/juce_data_structures.h"
"../../../../../modules/juce_dsp/containers/juce_AudioBlock.h"
"../../../../../modules/juce_dsp/containers/juce_AudioBlock_test.cpp"
"../../../../../modules/juce_dsp/containers/juce_FixedSizeFunction.h"
"../../../../../modules/juce_dsp/containers/juce_FixedSizeFunction_test.cpp"
"../../../../../modules/juce_dsp/containers/juce_SIMDRegister.h"
"../../../../../modules/juce_dsp/containers/juce_SIMDRegister_Impl.h"
"../../../../../modules/juce_dsp/containers/juce_SIMDRegister_test.cpp"
@ -1055,6 +1059,7 @@ add_library( ${BINARY_NAME}
"../../../../../modules/juce_dsp/filter_design/juce_FilterDesign.h"
"../../../../../modules/juce_dsp/frequency/juce_Convolution.cpp"
"../../../../../modules/juce_dsp/frequency/juce_Convolution.h"
"../../../../../modules/juce_dsp/frequency/juce_Convolution_test.cpp"
"../../../../../modules/juce_dsp/frequency/juce_FFT.cpp"
"../../../../../modules/juce_dsp/frequency/juce_FFT.h"
"../../../../../modules/juce_dsp/frequency/juce_FFT_test.cpp"
@ -2577,6 +2582,8 @@ set_source_files_properties("../../../../../modules/juce_core/maths/juce_Random.
set_source_files_properties("../../../../../modules/juce_core/maths/juce_Random.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_core/maths/juce_Range.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_core/maths/juce_StatisticsAccumulator.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_core/memory/juce_AllocationHooks.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_core/memory/juce_AllocationHooks.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_core/memory/juce_Atomic.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_core/memory/juce_ByteOrder.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_core/memory/juce_ContainerDeletePolicy.h" PROPERTIES HEADER_FILE_ONLY TRUE)
@ -2797,6 +2804,8 @@ set_source_files_properties("../../../../../modules/juce_data_structures/juce_da
set_source_files_properties("../../../../../modules/juce_data_structures/juce_data_structures.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_dsp/containers/juce_AudioBlock.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_dsp/containers/juce_AudioBlock_test.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_dsp/containers/juce_FixedSizeFunction.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_dsp/containers/juce_FixedSizeFunction_test.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_dsp/containers/juce_SIMDRegister.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_dsp/containers/juce_SIMDRegister_Impl.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_dsp/containers/juce_SIMDRegister_test.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)
@ -2804,6 +2813,7 @@ set_source_files_properties("../../../../../modules/juce_dsp/filter_design/juce_
set_source_files_properties("../../../../../modules/juce_dsp/filter_design/juce_FilterDesign.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_dsp/frequency/juce_Convolution.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_dsp/frequency/juce_Convolution.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_dsp/frequency/juce_Convolution_test.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_dsp/frequency/juce_FFT.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_dsp/frequency/juce_FFT.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_dsp/frequency/juce_FFT_test.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)

View file

@ -1109,6 +1109,9 @@
<ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Random.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -1388,6 +1391,9 @@
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock_test.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_FixedSizeFunction_test.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_test.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -1397,6 +1403,9 @@
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution_test.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_FFT.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -2887,6 +2896,7 @@
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Random.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Range.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_StatisticsAccumulator.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Atomic.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ByteOrder.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ContainerDeletePolicy.h"/>
@ -3005,6 +3015,7 @@
<ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueWithDefault.h"/>
<ClInclude Include="..\..\..\..\modules\juce_data_structures\juce_data_structures.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_FixedSizeFunction.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_Impl.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\filter_design\juce_FilterDesign.h"/>

View file

@ -1576,6 +1576,9 @@
<ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Random.cpp">
<Filter>JUCE Modules\juce_core\maths</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.cpp">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.cpp">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClCompile>
@ -1879,6 +1882,9 @@
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock_test.cpp">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_FixedSizeFunction_test.cpp">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_test.cpp">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClCompile>
@ -1888,6 +1894,9 @@
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution.cpp">
<Filter>JUCE Modules\juce_dsp\frequency</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution_test.cpp">
<Filter>JUCE Modules\juce_dsp\frequency</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_FFT.cpp">
<Filter>JUCE Modules\juce_dsp\frequency</Filter>
</ClCompile>
@ -4368,6 +4377,9 @@
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_StatisticsAccumulator.h">
<Filter>JUCE Modules\juce_core\maths</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.h">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Atomic.h">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClInclude>
@ -4722,6 +4734,9 @@
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock.h">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_FixedSizeFunction.h">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister.h">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClInclude>

View file

@ -1109,6 +1109,9 @@
<ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Random.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -1388,6 +1391,9 @@
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock_test.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_FixedSizeFunction_test.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_test.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -1397,6 +1403,9 @@
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution_test.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_FFT.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -2887,6 +2896,7 @@
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Random.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Range.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_StatisticsAccumulator.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Atomic.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ByteOrder.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ContainerDeletePolicy.h"/>
@ -3005,6 +3015,7 @@
<ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueWithDefault.h"/>
<ClInclude Include="..\..\..\..\modules\juce_data_structures\juce_data_structures.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_FixedSizeFunction.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_Impl.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\filter_design\juce_FilterDesign.h"/>

View file

@ -1576,6 +1576,9 @@
<ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Random.cpp">
<Filter>JUCE Modules\juce_core\maths</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.cpp">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.cpp">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClCompile>
@ -1879,6 +1882,9 @@
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock_test.cpp">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_FixedSizeFunction_test.cpp">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_test.cpp">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClCompile>
@ -1888,6 +1894,9 @@
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution.cpp">
<Filter>JUCE Modules\juce_dsp\frequency</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution_test.cpp">
<Filter>JUCE Modules\juce_dsp\frequency</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_FFT.cpp">
<Filter>JUCE Modules\juce_dsp\frequency</Filter>
</ClCompile>
@ -4368,6 +4377,9 @@
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_StatisticsAccumulator.h">
<Filter>JUCE Modules\juce_core\maths</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.h">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Atomic.h">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClInclude>
@ -4722,6 +4734,9 @@
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock.h">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_FixedSizeFunction.h">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister.h">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClInclude>

View file

@ -1109,6 +1109,9 @@
<ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Random.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -1388,6 +1391,9 @@
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock_test.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_FixedSizeFunction_test.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_test.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -1397,6 +1403,9 @@
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution_test.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_FFT.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -2887,6 +2896,7 @@
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Random.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Range.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_StatisticsAccumulator.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Atomic.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ByteOrder.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ContainerDeletePolicy.h"/>
@ -3005,6 +3015,7 @@
<ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueWithDefault.h"/>
<ClInclude Include="..\..\..\..\modules\juce_data_structures\juce_data_structures.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_FixedSizeFunction.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_Impl.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\filter_design\juce_FilterDesign.h"/>

View file

@ -1576,6 +1576,9 @@
<ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Random.cpp">
<Filter>JUCE Modules\juce_core\maths</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.cpp">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.cpp">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClCompile>
@ -1879,6 +1882,9 @@
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock_test.cpp">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_FixedSizeFunction_test.cpp">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_test.cpp">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClCompile>
@ -1888,6 +1894,9 @@
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution.cpp">
<Filter>JUCE Modules\juce_dsp\frequency</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution_test.cpp">
<Filter>JUCE Modules\juce_dsp\frequency</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_FFT.cpp">
<Filter>JUCE Modules\juce_dsp\frequency</Filter>
</ClCompile>
@ -4368,6 +4377,9 @@
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_StatisticsAccumulator.h">
<Filter>JUCE Modules\juce_core\maths</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.h">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Atomic.h">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClInclude>
@ -4722,6 +4734,9 @@
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock.h">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_FixedSizeFunction.h">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister.h">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClInclude>

File diff suppressed because it is too large Load diff

View file

@ -667,6 +667,8 @@ add_library( ${BINARY_NAME}
"../../../../../modules/juce_core/maths/juce_Random.h"
"../../../../../modules/juce_core/maths/juce_Range.h"
"../../../../../modules/juce_core/maths/juce_StatisticsAccumulator.h"
"../../../../../modules/juce_core/memory/juce_AllocationHooks.cpp"
"../../../../../modules/juce_core/memory/juce_AllocationHooks.h"
"../../../../../modules/juce_core/memory/juce_Atomic.h"
"../../../../../modules/juce_core/memory/juce_ByteOrder.h"
"../../../../../modules/juce_core/memory/juce_ContainerDeletePolicy.h"
@ -2076,6 +2078,8 @@ set_source_files_properties("../../../../../modules/juce_core/maths/juce_Random.
set_source_files_properties("../../../../../modules/juce_core/maths/juce_Random.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_core/maths/juce_Range.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_core/maths/juce_StatisticsAccumulator.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_core/memory/juce_AllocationHooks.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_core/memory/juce_AllocationHooks.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_core/memory/juce_Atomic.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_core/memory/juce_ByteOrder.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_core/memory/juce_ContainerDeletePolicy.h" PROPERTIES HEADER_FILE_ONLY TRUE)

View file

@ -895,6 +895,9 @@
<ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Random.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -2372,6 +2375,7 @@
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Random.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Range.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_StatisticsAccumulator.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Atomic.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ByteOrder.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ContainerDeletePolicy.h"/>

View file

@ -1210,6 +1210,9 @@
<ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Random.cpp">
<Filter>JUCE Modules\juce_core\maths</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.cpp">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.cpp">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClCompile>
@ -3504,6 +3507,9 @@
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_StatisticsAccumulator.h">
<Filter>JUCE Modules\juce_core\maths</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.h">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Atomic.h">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClInclude>

View file

@ -684,6 +684,8 @@ add_library( ${BINARY_NAME}
"../../../../../modules/juce_core/maths/juce_Random.h"
"../../../../../modules/juce_core/maths/juce_Range.h"
"../../../../../modules/juce_core/maths/juce_StatisticsAccumulator.h"
"../../../../../modules/juce_core/memory/juce_AllocationHooks.cpp"
"../../../../../modules/juce_core/memory/juce_AllocationHooks.h"
"../../../../../modules/juce_core/memory/juce_Atomic.h"
"../../../../../modules/juce_core/memory/juce_ByteOrder.h"
"../../../../../modules/juce_core/memory/juce_ContainerDeletePolicy.h"
@ -904,6 +906,8 @@ add_library( ${BINARY_NAME}
"../../../../../modules/juce_data_structures/juce_data_structures.h"
"../../../../../modules/juce_dsp/containers/juce_AudioBlock.h"
"../../../../../modules/juce_dsp/containers/juce_AudioBlock_test.cpp"
"../../../../../modules/juce_dsp/containers/juce_FixedSizeFunction.h"
"../../../../../modules/juce_dsp/containers/juce_FixedSizeFunction_test.cpp"
"../../../../../modules/juce_dsp/containers/juce_SIMDRegister.h"
"../../../../../modules/juce_dsp/containers/juce_SIMDRegister_Impl.h"
"../../../../../modules/juce_dsp/containers/juce_SIMDRegister_test.cpp"
@ -911,6 +915,7 @@ add_library( ${BINARY_NAME}
"../../../../../modules/juce_dsp/filter_design/juce_FilterDesign.h"
"../../../../../modules/juce_dsp/frequency/juce_Convolution.cpp"
"../../../../../modules/juce_dsp/frequency/juce_Convolution.h"
"../../../../../modules/juce_dsp/frequency/juce_Convolution_test.cpp"
"../../../../../modules/juce_dsp/frequency/juce_FFT.cpp"
"../../../../../modules/juce_dsp/frequency/juce_FFT.h"
"../../../../../modules/juce_dsp/frequency/juce_FFT_test.cpp"
@ -2248,6 +2253,8 @@ set_source_files_properties("../../../../../modules/juce_core/maths/juce_Random.
set_source_files_properties("../../../../../modules/juce_core/maths/juce_Random.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_core/maths/juce_Range.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_core/maths/juce_StatisticsAccumulator.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_core/memory/juce_AllocationHooks.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_core/memory/juce_AllocationHooks.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_core/memory/juce_Atomic.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_core/memory/juce_ByteOrder.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_core/memory/juce_ContainerDeletePolicy.h" PROPERTIES HEADER_FILE_ONLY TRUE)
@ -2468,6 +2475,8 @@ set_source_files_properties("../../../../../modules/juce_data_structures/juce_da
set_source_files_properties("../../../../../modules/juce_data_structures/juce_data_structures.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_dsp/containers/juce_AudioBlock.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_dsp/containers/juce_AudioBlock_test.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_dsp/containers/juce_FixedSizeFunction.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_dsp/containers/juce_FixedSizeFunction_test.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_dsp/containers/juce_SIMDRegister.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_dsp/containers/juce_SIMDRegister_Impl.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_dsp/containers/juce_SIMDRegister_test.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)
@ -2475,6 +2484,7 @@ set_source_files_properties("../../../../../modules/juce_dsp/filter_design/juce_
set_source_files_properties("../../../../../modules/juce_dsp/filter_design/juce_FilterDesign.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_dsp/frequency/juce_Convolution.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_dsp/frequency/juce_Convolution.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_dsp/frequency/juce_Convolution_test.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_dsp/frequency/juce_FFT.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_dsp/frequency/juce_FFT.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_dsp/frequency/juce_FFT_test.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)

View file

@ -902,6 +902,9 @@
<ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Random.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -1181,6 +1184,9 @@
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock_test.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_FixedSizeFunction_test.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_test.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -1190,6 +1196,9 @@
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution_test.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_FFT.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -2551,6 +2560,7 @@
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Random.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Range.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_StatisticsAccumulator.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Atomic.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ByteOrder.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ContainerDeletePolicy.h"/>
@ -2669,6 +2679,7 @@
<ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueWithDefault.h"/>
<ClInclude Include="..\..\..\..\modules\juce_data_structures\juce_data_structures.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_FixedSizeFunction.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_Impl.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\filter_design\juce_FilterDesign.h"/>

View file

@ -1291,6 +1291,9 @@
<ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Random.cpp">
<Filter>JUCE Modules\juce_core\maths</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.cpp">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.cpp">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClCompile>
@ -1594,6 +1597,9 @@
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock_test.cpp">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_FixedSizeFunction_test.cpp">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_test.cpp">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClCompile>
@ -1603,6 +1609,9 @@
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution.cpp">
<Filter>JUCE Modules\juce_dsp\frequency</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution_test.cpp">
<Filter>JUCE Modules\juce_dsp\frequency</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_FFT.cpp">
<Filter>JUCE Modules\juce_dsp\frequency</Filter>
</ClCompile>
@ -3789,6 +3798,9 @@
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_StatisticsAccumulator.h">
<Filter>JUCE Modules\juce_core\maths</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.h">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Atomic.h">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClInclude>
@ -4143,6 +4155,9 @@
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock.h">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_FixedSizeFunction.h">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister.h">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClInclude>

View file

@ -902,6 +902,9 @@
<ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Random.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -1181,6 +1184,9 @@
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock_test.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_FixedSizeFunction_test.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_test.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -1190,6 +1196,9 @@
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution_test.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_FFT.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -2551,6 +2560,7 @@
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Random.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Range.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_StatisticsAccumulator.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Atomic.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ByteOrder.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ContainerDeletePolicy.h"/>
@ -2669,6 +2679,7 @@
<ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueWithDefault.h"/>
<ClInclude Include="..\..\..\..\modules\juce_data_structures\juce_data_structures.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_FixedSizeFunction.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_Impl.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\filter_design\juce_FilterDesign.h"/>

View file

@ -1291,6 +1291,9 @@
<ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Random.cpp">
<Filter>JUCE Modules\juce_core\maths</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.cpp">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.cpp">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClCompile>
@ -1594,6 +1597,9 @@
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock_test.cpp">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_FixedSizeFunction_test.cpp">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_test.cpp">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClCompile>
@ -1603,6 +1609,9 @@
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution.cpp">
<Filter>JUCE Modules\juce_dsp\frequency</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution_test.cpp">
<Filter>JUCE Modules\juce_dsp\frequency</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_FFT.cpp">
<Filter>JUCE Modules\juce_dsp\frequency</Filter>
</ClCompile>
@ -3789,6 +3798,9 @@
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_StatisticsAccumulator.h">
<Filter>JUCE Modules\juce_core\maths</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.h">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Atomic.h">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClInclude>
@ -4143,6 +4155,9 @@
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock.h">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_FixedSizeFunction.h">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister.h">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClInclude>

View file

@ -902,6 +902,9 @@
<ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Random.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -1181,6 +1184,9 @@
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock_test.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_FixedSizeFunction_test.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_test.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -1190,6 +1196,9 @@
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution_test.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_FFT.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -2551,6 +2560,7 @@
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Random.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Range.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_StatisticsAccumulator.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Atomic.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ByteOrder.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ContainerDeletePolicy.h"/>
@ -2669,6 +2679,7 @@
<ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueWithDefault.h"/>
<ClInclude Include="..\..\..\..\modules\juce_data_structures\juce_data_structures.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_FixedSizeFunction.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_Impl.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\filter_design\juce_FilterDesign.h"/>

View file

@ -1291,6 +1291,9 @@
<ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Random.cpp">
<Filter>JUCE Modules\juce_core\maths</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.cpp">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.cpp">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClCompile>
@ -1594,6 +1597,9 @@
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock_test.cpp">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_FixedSizeFunction_test.cpp">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_test.cpp">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClCompile>
@ -1603,6 +1609,9 @@
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution.cpp">
<Filter>JUCE Modules\juce_dsp\frequency</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution_test.cpp">
<Filter>JUCE Modules\juce_dsp\frequency</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_FFT.cpp">
<Filter>JUCE Modules\juce_dsp\frequency</Filter>
</ClCompile>
@ -3789,6 +3798,9 @@
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_StatisticsAccumulator.h">
<Filter>JUCE Modules\juce_core\maths</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.h">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Atomic.h">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClInclude>
@ -4143,6 +4155,9 @@
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock.h">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_FixedSizeFunction.h">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister.h">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClInclude>

View file

@ -217,6 +217,9 @@
<ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Random.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -486,6 +489,7 @@
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Random.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Range.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_StatisticsAccumulator.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Atomic.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ByteOrder.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ContainerDeletePolicy.h"/>

View file

@ -157,6 +157,9 @@
<ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Random.cpp">
<Filter>JUCE Modules\juce_core\maths</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.cpp">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.cpp">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClCompile>
@ -522,6 +525,9 @@
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_StatisticsAccumulator.h">
<Filter>JUCE Modules\juce_core\maths</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.h">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Atomic.h">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClInclude>

View file

@ -671,6 +671,8 @@ add_library( ${BINARY_NAME}
"../../../../../modules/juce_core/maths/juce_Random.h"
"../../../../../modules/juce_core/maths/juce_Range.h"
"../../../../../modules/juce_core/maths/juce_StatisticsAccumulator.h"
"../../../../../modules/juce_core/memory/juce_AllocationHooks.cpp"
"../../../../../modules/juce_core/memory/juce_AllocationHooks.h"
"../../../../../modules/juce_core/memory/juce_Atomic.h"
"../../../../../modules/juce_core/memory/juce_ByteOrder.h"
"../../../../../modules/juce_core/memory/juce_ContainerDeletePolicy.h"
@ -2155,6 +2157,8 @@ set_source_files_properties("../../../../../modules/juce_core/maths/juce_Random.
set_source_files_properties("../../../../../modules/juce_core/maths/juce_Random.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_core/maths/juce_Range.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_core/maths/juce_StatisticsAccumulator.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_core/memory/juce_AllocationHooks.cpp" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_core/memory/juce_AllocationHooks.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_core/memory/juce_Atomic.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_core/memory/juce_ByteOrder.h" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties("../../../../../modules/juce_core/memory/juce_ContainerDeletePolicy.h" PROPERTIES HEADER_FILE_ONLY TRUE)

View file

@ -895,6 +895,9 @@
<ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Random.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -2457,6 +2460,7 @@
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Random.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Range.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_StatisticsAccumulator.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Atomic.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ByteOrder.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ContainerDeletePolicy.h"/>

View file

@ -1240,6 +1240,9 @@
<ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Random.cpp">
<Filter>JUCE Modules\juce_core\maths</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.cpp">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.cpp">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClCompile>
@ -3639,6 +3642,9 @@
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_StatisticsAccumulator.h">
<Filter>JUCE Modules\juce_core\maths</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.h">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Atomic.h">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClInclude>

View file

@ -344,6 +344,9 @@
<ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Random.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -1721,6 +1724,7 @@
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Random.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Range.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_StatisticsAccumulator.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Atomic.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ByteOrder.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ContainerDeletePolicy.h"/>

View file

@ -622,6 +622,9 @@
<ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Random.cpp">
<Filter>JUCE Modules\juce_core\maths</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.cpp">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.cpp">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClCompile>
@ -2577,6 +2580,9 @@
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_StatisticsAccumulator.h">
<Filter>JUCE Modules\juce_core\maths</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.h">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Atomic.h">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClInclude>

View file

@ -344,6 +344,9 @@
<ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Random.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -1721,6 +1724,7 @@
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Random.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Range.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_StatisticsAccumulator.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Atomic.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ByteOrder.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ContainerDeletePolicy.h"/>

View file

@ -622,6 +622,9 @@
<ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Random.cpp">
<Filter>JUCE Modules\juce_core\maths</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.cpp">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.cpp">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClCompile>
@ -2577,6 +2580,9 @@
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_StatisticsAccumulator.h">
<Filter>JUCE Modules\juce_core\maths</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.h">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Atomic.h">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClInclude>

View file

@ -344,6 +344,9 @@
<ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Random.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -1721,6 +1724,7 @@
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Random.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Range.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_StatisticsAccumulator.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Atomic.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ByteOrder.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ContainerDeletePolicy.h"/>

View file

@ -622,6 +622,9 @@
<ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Random.cpp">
<Filter>JUCE Modules\juce_core\maths</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.cpp">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.cpp">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClCompile>
@ -2577,6 +2580,9 @@
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_StatisticsAccumulator.h">
<Filter>JUCE Modules\juce_core\maths</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.h">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Atomic.h">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClInclude>

View file

@ -965,6 +965,9 @@
<ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Random.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -1244,6 +1247,9 @@
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock_test.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_FixedSizeFunction_test.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_test.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -1253,6 +1259,9 @@
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution_test.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_FFT.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -2689,6 +2698,7 @@
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Random.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Range.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_StatisticsAccumulator.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Atomic.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ByteOrder.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ContainerDeletePolicy.h"/>
@ -2807,6 +2817,7 @@
<ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueWithDefault.h"/>
<ClInclude Include="..\..\..\..\modules\juce_data_structures\juce_data_structures.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_FixedSizeFunction.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_Impl.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\filter_design\juce_FilterDesign.h"/>

View file

@ -1384,6 +1384,9 @@
<ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Random.cpp">
<Filter>JUCE Modules\juce_core\maths</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.cpp">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.cpp">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClCompile>
@ -1687,6 +1690,9 @@
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock_test.cpp">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_FixedSizeFunction_test.cpp">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_test.cpp">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClCompile>
@ -1696,6 +1702,9 @@
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution.cpp">
<Filter>JUCE Modules\juce_dsp\frequency</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution_test.cpp">
<Filter>JUCE Modules\juce_dsp\frequency</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_FFT.cpp">
<Filter>JUCE Modules\juce_dsp\frequency</Filter>
</ClCompile>
@ -4014,6 +4023,9 @@
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_StatisticsAccumulator.h">
<Filter>JUCE Modules\juce_core\maths</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.h">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Atomic.h">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClInclude>
@ -4368,6 +4380,9 @@
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock.h">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_FixedSizeFunction.h">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister.h">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClInclude>

View file

@ -965,6 +965,9 @@
<ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Random.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -1244,6 +1247,9 @@
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock_test.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_FixedSizeFunction_test.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_test.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -1253,6 +1259,9 @@
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution_test.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_FFT.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -2689,6 +2698,7 @@
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Random.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Range.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_StatisticsAccumulator.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Atomic.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ByteOrder.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ContainerDeletePolicy.h"/>
@ -2807,6 +2817,7 @@
<ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueWithDefault.h"/>
<ClInclude Include="..\..\..\..\modules\juce_data_structures\juce_data_structures.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_FixedSizeFunction.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_Impl.h"/>
<ClInclude Include="..\..\..\..\modules\juce_dsp\filter_design\juce_FilterDesign.h"/>

View file

@ -1384,6 +1384,9 @@
<ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Random.cpp">
<Filter>JUCE Modules\juce_core\maths</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.cpp">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.cpp">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClCompile>
@ -1687,6 +1690,9 @@
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock_test.cpp">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_FixedSizeFunction_test.cpp">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister_test.cpp">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClCompile>
@ -1696,6 +1702,9 @@
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution.cpp">
<Filter>JUCE Modules\juce_dsp\frequency</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_Convolution_test.cpp">
<Filter>JUCE Modules\juce_dsp\frequency</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_dsp\frequency\juce_FFT.cpp">
<Filter>JUCE Modules\juce_dsp\frequency</Filter>
</ClCompile>
@ -4014,6 +4023,9 @@
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_StatisticsAccumulator.h">
<Filter>JUCE Modules\juce_core\maths</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.h">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Atomic.h">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClInclude>
@ -4368,6 +4380,9 @@
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock.h">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_FixedSizeFunction.h">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_SIMDRegister.h">
<Filter>JUCE Modules\juce_dsp\containers</Filter>
</ClInclude>

View file

@ -894,6 +894,9 @@
<ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Random.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
@ -2433,6 +2436,7 @@
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Random.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_Range.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_StatisticsAccumulator.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Atomic.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ByteOrder.h"/>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ContainerDeletePolicy.h"/>

View file

@ -1237,6 +1237,9 @@
<ClCompile Include="..\..\..\..\modules\juce_core\maths\juce_Random.cpp">
<Filter>JUCE Modules\juce_core\maths</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.cpp">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.cpp">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClCompile>
@ -3606,6 +3609,9 @@
<ClInclude Include="..\..\..\..\modules\juce_core\maths\juce_StatisticsAccumulator.h">
<Filter>JUCE Modules\juce_core\maths</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_AllocationHooks.h">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Atomic.h">
<Filter>JUCE Modules\juce_core\memory</Filter>
</ClInclude>

View file

@ -136,6 +136,7 @@
#include "maths/juce_Expression.cpp"
#include "maths/juce_Random.cpp"
#include "memory/juce_MemoryBlock.cpp"
#include "memory/juce_AllocationHooks.cpp"
#include "misc/juce_RuntimePermissions.cpp"
#include "misc/juce_Result.cpp"
#include "misc/juce_Uuid.cpp"

View file

@ -177,6 +177,13 @@
#define JUCE_STRICT_REFCOUNTEDPOINTER 0
#endif
/** Config: JUCE_ENABLE_ALLOCATION_HOOKS
If enabled, this will add global allocation functions with built-in assertions, which may
help when debugging allocations in unit tests.
*/
#ifndef JUCE_ENABLE_ALLOCATION_HOOKS
#define JUCE_ENABLE_ALLOCATION_HOOKS 0
#endif
#ifndef JUCE_STRING_UTF_TYPE
#define JUCE_STRING_UTF_TYPE 8
@ -330,6 +337,7 @@ JUCE_END_IGNORE_WARNINGS_MSVC
#include "zip/juce_ZipFile.h"
#include "containers/juce_PropertySet.h"
#include "memory/juce_SharedResourcePointer.h"
#include "memory/juce_AllocationHooks.h"
#if JUCE_CORE_INCLUDE_OBJC_HELPERS && (JUCE_MAC || JUCE_IOS)
#include "native/juce_osx_ObjCHelpers.h"

View file

@ -0,0 +1,100 @@
/*
==============================================================================
This file is part of the JUCE 6 technical preview.
Copyright (c) 2020 - Raw Material Software Limited
You may use this code under the terms of the GPL v3
(see www.gnu.org/licenses).
For this technical preview, this file is not subject to commercial licensing.
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
DISCLAIMED.
==============================================================================
*/
#if JUCE_ENABLE_ALLOCATION_HOOKS
namespace juce
{
static AllocationHooks& getAllocationHooksForThread()
{
thread_local AllocationHooks hooks;
return hooks;
}
void notifyAllocationHooksForThread()
{
getAllocationHooksForThread().listenerList.call ([] (AllocationHooks::Listener& l)
{
l.newOrDeleteCalled();
});
}
}
void* operator new (size_t s)
{
juce::notifyAllocationHooksForThread();
return std::malloc (s);
}
void* operator new[] (size_t s)
{
juce::notifyAllocationHooksForThread();
return std::malloc (s);
}
void operator delete (void* p) noexcept
{
juce::notifyAllocationHooksForThread();
std::free (p);
}
void operator delete[] (void* p) noexcept
{
juce::notifyAllocationHooksForThread();
std::free (p);
}
#if JUCE_CXX14_IS_AVAILABLE
void operator delete (void* p, size_t) noexcept
{
juce::notifyAllocationHooksForThread();
std::free (p);
}
void operator delete[] (void* p, size_t) noexcept
{
juce::notifyAllocationHooksForThread();
std::free (p);
}
#endif
namespace juce
{
//==============================================================================
UnitTestAllocationChecker::UnitTestAllocationChecker (UnitTest& test)
: unitTest (test)
{
getAllocationHooksForThread().addListener (this);
}
UnitTestAllocationChecker::~UnitTestAllocationChecker() noexcept
{
getAllocationHooksForThread().removeListener (this);
unitTest.expectEquals (calls, (size_t) 0, "new or delete was incorrectly called while allocation checker was active");
}
void UnitTestAllocationChecker::newOrDeleteCalled() noexcept { ++calls; }
}
#endif

View file

@ -0,0 +1,69 @@
/*
==============================================================================
This file is part of the JUCE 6 technical preview.
Copyright (c) 2020 - Raw Material Software Limited
You may use this code under the terms of the GPL v3
(see www.gnu.org/licenses).
For this technical preview, this file is not subject to commercial licensing.
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
DISCLAIMED.
==============================================================================
*/
#if JUCE_ENABLE_ALLOCATION_HOOKS
namespace juce
{
class AllocationHooks
{
public:
struct Listener
{
virtual ~Listener() noexcept = default;
virtual void newOrDeleteCalled() noexcept = 0;
};
void addListener (Listener* l) { listenerList.add (l); }
void removeListener (Listener* l) noexcept { listenerList.remove (l); }
private:
friend void notifyAllocationHooksForThread();
ListenerList<Listener> listenerList;
};
//==============================================================================
/** Scoped checker which will cause a unit test failure if any new/delete calls
are made during the lifetime of the UnitTestAllocationChecker.
*/
class UnitTestAllocationChecker : private AllocationHooks::Listener
{
public:
/** Create a checker which will log a failure to the passed test if
any calls to new/delete are made.
Remember to call `UnitTest::beginTest` before constructing this checker!
*/
explicit UnitTestAllocationChecker (UnitTest& test);
/** Will add a failure to the test if the number of new/delete calls during
this object's lifetime was greater than zero.
*/
~UnitTestAllocationChecker() noexcept override;
private:
void newOrDeleteCalled() noexcept override;
UnitTest& unitTest;
size_t calls = 0;
};
}
#endif

View file

@ -143,6 +143,19 @@ public:
{
}
/** Creates an AudioBlock that points to the data in an AudioBuffer.
AudioBlock does not copy nor own the memory pointed to by dataToUse.
Therefore it is the user's responsibility to ensure that the buffer is retained
throughout the life-time of the AudioBlock without being modified.
*/
template <typename OtherSampleType>
constexpr AudioBlock (const AudioBuffer<OtherSampleType>& buffer) noexcept
: channels (buffer.getArrayOfReadPointers()),
numChannels (static_cast<ChannelCountType> (buffer.getNumChannels())),
numSamples (static_cast<size_t> (buffer.getNumSamples()))
{
}
/** Creates an AudioBlock that points to the data in an AudioBuffer.
AudioBlock does not copy nor own the memory pointed to by dataToUse.
Therefore it is the user's responsibility to ensure that the buffer is retained

View file

@ -0,0 +1,230 @@
/*
==============================================================================
This file is part of the JUCE 6 technical preview.
Copyright (c) 2020 - Raw Material Software Limited
You may use this code under the terms of the GPL v3
(see www.gnu.org/licenses).
For this technical preview, this file is not subject to commercial licensing.
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
DISCLAIMED.
==============================================================================
*/
namespace juce
{
namespace dsp
{
namespace detail
{
template <typename Ret, typename... Args>
struct Vtable
{
using Storage = void*;
using Move = void (*) (Storage, Storage);
using Call = Ret (*) (Storage, Args...);
using Clear = void (*) (Storage);
constexpr Vtable (Move moveIn, Call callIn, Clear clearIn) noexcept
: move (moveIn), call (callIn), clear (clearIn) {}
Move move = nullptr;
Call call = nullptr;
Clear clear = nullptr;
};
template <typename Fn>
void move (void* from, void* to)
{
new (to) Fn (std::move (*reinterpret_cast<Fn*> (from)));
}
template <typename Fn, typename Ret, typename... Args>
typename std::enable_if<std::is_same<Ret, void>::value, Ret>::type call (void* s, Args... args)
{
(*reinterpret_cast<Fn*> (s)) (args...);
}
template <typename Fn, typename Ret, typename... Args>
typename std::enable_if<! std::is_same<Ret, void>::value, Ret>::type call (void* s, Args... args)
{
return (*reinterpret_cast<Fn*> (s)) (std::forward<Args> (args)...);
}
template <typename Fn>
void clear (void* s)
{
auto& fn = *reinterpret_cast<Fn*> (s);
fn.~Fn();
// I know this looks insane, for some reason MSVC 14 sometimes thinks fn is unreferenced
juce::ignoreUnused (fn);
}
template <typename Fn, typename Ret, typename... Args>
constexpr Vtable<Ret, Args...> makeVtable()
{
return { move <Fn>, call <Fn, Ret, Args...>, clear<Fn> };
}
} // namespace detail
template <size_t len, typename T>
class FixedSizeFunction;
/**
A type similar to `std::function` that holds a callable object.
Unlike `std::function`, the callable object will always be stored in
a buffer of size `len` that is internal to the FixedSizeFunction instance.
This in turn means that creating a FixedSizeFunction instance will never allocate,
making FixedSizeFunctions suitable for use in realtime contexts.
*/
template <size_t len, typename Ret, typename... Args>
class FixedSizeFunction<len, Ret (Args...)>
{
private:
using Storage = typename std::aligned_storage<len>::type;
template <typename Item>
using Decay = typename std::decay<Item>::type;
template <typename Item, typename Fn = Decay<Item>>
using IntIfValidConversion = typename std::enable_if<sizeof (Fn) <= len
&& alignof (Fn) <= alignof (Storage)
&& ! std::is_same<FixedSizeFunction, Fn>::value,
int>::type;
public:
/** Create an empty function. */
FixedSizeFunction() noexcept = default;
/** Create an empty function. */
FixedSizeFunction (std::nullptr_t) noexcept
: FixedSizeFunction() {}
FixedSizeFunction (const FixedSizeFunction&) = delete;
/** Forwards the passed Callable into the internal storage buffer. */
template <typename Callable,
typename Fn = Decay<Callable>,
IntIfValidConversion<Callable> = 0>
FixedSizeFunction (Callable&& callable)
{
static_assert (sizeof (Fn) <= len,
"The requested function cannot fit in this FixedSizeFunction");
static_assert (alignof (Fn) <= alignof (Storage),
"FixedSizeFunction cannot accommodate the requested alignment requirements");
static constexpr auto vtableForCallable = detail::makeVtable<Fn, Ret, Args...>();
vtable = &vtableForCallable;
auto* ptr = new (&storage) Fn (std::forward<Callable> (callable));
jassert ((void*) ptr == (void*) &storage);
juce::ignoreUnused (ptr);
}
/** Move constructor. */
FixedSizeFunction (FixedSizeFunction&& other) noexcept
: vtable (other.vtable)
{
move (std::move (other));
}
/** Converting constructor from smaller FixedSizeFunctions. */
template <size_t otherLen, typename std::enable_if<(otherLen < len), int>::type = 0>
FixedSizeFunction (FixedSizeFunction<otherLen, Ret (Args...)>&& other) noexcept
: vtable (other.vtable)
{
move (std::move (other));
}
/** Nulls this instance. */
FixedSizeFunction& operator= (std::nullptr_t) noexcept
{
return *this = FixedSizeFunction();
}
FixedSizeFunction& operator= (const FixedSizeFunction&) = delete;
/** Assigns a new callable to this instance. */
template <typename Callable, IntIfValidConversion<Callable> = 0>
FixedSizeFunction& operator= (Callable&& callable)
{
return *this = FixedSizeFunction (std::forward<Callable> (callable));
}
/** Move assignment from smaller FixedSizeFunctions. */
template <size_t otherLen, typename std::enable_if<(otherLen < len), int>::type = 0>
FixedSizeFunction& operator= (FixedSizeFunction<otherLen, Ret (Args...)>&& other) noexcept
{
return *this = FixedSizeFunction (std::move (other));
}
/** Move assignment operator. */
FixedSizeFunction& operator= (FixedSizeFunction&& other) noexcept
{
clear();
vtable = other.vtable;
move (std::move (other));
return *this;
}
/** Destructor. */
~FixedSizeFunction() noexcept { clear(); }
/** If this instance is currently storing a callable object, calls that object,
otherwise throws `std::bad_function_call`.
*/
Ret operator() (Args... args) const
{
if (vtable != nullptr)
return vtable->call (&storage, std::forward<Args> (args)...);
throw std::bad_function_call();
}
/** Returns true if this instance currently holds a callable. */
explicit operator bool() const noexcept { return vtable != nullptr; }
private:
template <size_t, typename>
friend class FixedSizeFunction;
void clear() noexcept
{
if (vtable != nullptr)
vtable->clear (&storage);
}
template <size_t otherLen, typename T>
void move (FixedSizeFunction<otherLen, T>&& other) noexcept
{
if (vtable != nullptr)
vtable->move (&other.storage, &storage);
}
const detail::Vtable<Ret, Args...>* vtable = nullptr;
mutable Storage storage;
};
template <size_t len, typename T>
bool operator!= (const FixedSizeFunction<len, T>& fn, std::nullptr_t) { return bool (fn); }
template <size_t len, typename T>
bool operator!= (std::nullptr_t, const FixedSizeFunction<len, T>& fn) { return bool (fn); }
template <size_t len, typename T>
bool operator== (const FixedSizeFunction<len, T>& fn, std::nullptr_t) { return ! (fn != nullptr); }
template <size_t len, typename T>
bool operator== (std::nullptr_t, const FixedSizeFunction<len, T>& fn) { return ! (fn != nullptr); }
}
}

View file

@ -0,0 +1,345 @@
/*
==============================================================================
This file is part of the JUCE 6 technical preview.
Copyright (c) 2020 - Raw Material Software Limited
You may use this code under the terms of the GPL v3
(see www.gnu.org/licenses).
For this technical preview, this file is not subject to commercial licensing.
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
DISCLAIMED.
==============================================================================
*/
#if JUCE_ENABLE_ALLOCATION_HOOKS
#define JUCE_FAIL_ON_ALLOCATION_IN_SCOPE const UnitTestAllocationChecker checker (*this)
#else
#define JUCE_FAIL_ON_ALLOCATION_IN_SCOPE
#endif
namespace juce
{
namespace dsp
{
namespace
{
class ConstructCounts
{
auto tie() const noexcept { return std::tie (constructions, copies, moves, calls, destructions); }
public:
int constructions = 0;
int copies = 0;
int moves = 0;
int calls = 0;
int destructions = 0;
ConstructCounts withConstructions (int i) const noexcept { auto c = *this; c.constructions = i; return c; }
ConstructCounts withCopies (int i) const noexcept { auto c = *this; c.copies = i; return c; }
ConstructCounts withMoves (int i) const noexcept { auto c = *this; c.moves = i; return c; }
ConstructCounts withCalls (int i) const noexcept { auto c = *this; c.calls = i; return c; }
ConstructCounts withDestructions (int i) const noexcept { auto c = *this; c.destructions = i; return c; }
bool operator== (const ConstructCounts& other) const noexcept { return tie() == other.tie(); }
bool operator!= (const ConstructCounts& other) const noexcept { return tie() != other.tie(); }
};
String& operator<< (String& str, const ConstructCounts& c)
{
return str << "{ constructions: " << c.constructions
<< ", copies: " << c.copies
<< ", moves: " << c.moves
<< ", calls: " << c.calls
<< ", destructions: " << c.destructions
<< " }";
}
class FixedSizeFunctionTest : public UnitTest
{
static void toggleBool (bool& b) { b = ! b; }
struct ConstructCounter
{
explicit ConstructCounter (ConstructCounts& countsIn)
: counts (countsIn) {}
ConstructCounter (const ConstructCounter& c)
: counts (c.counts)
{
counts.copies += 1;
}
ConstructCounter (ConstructCounter&& c) noexcept
: counts (c.counts)
{
counts.moves += 1;
}
~ConstructCounter() noexcept { counts.destructions += 1; }
void operator()() const noexcept { counts.calls += 1; }
ConstructCounts& counts;
};
public:
FixedSizeFunctionTest()
: UnitTest ("Fixed Size Function", UnitTestCategories::dsp)
{}
void runTest() override
{
beginTest ("Can be constructed and called from a lambda");
{
JUCE_FAIL_ON_ALLOCATION_IN_SCOPE;
const auto result = 5;
bool wasCalled = false;
const auto lambda = [&] { wasCalled = true; return result; };
const FixedSizeFunction<sizeof (lambda), int()> fn (lambda);
const auto out = fn();
expect (wasCalled);
expectEquals (result, out);
}
beginTest ("void fn can be constructed from function with return value");
{
JUCE_FAIL_ON_ALLOCATION_IN_SCOPE;
bool wasCalled = false;
const auto lambda = [&] { wasCalled = true; return 5; };
const FixedSizeFunction<sizeof (lambda), void()> fn (lambda);
fn();
expect (wasCalled);
}
beginTest ("Can be constructed and called from a function pointer");
{
JUCE_FAIL_ON_ALLOCATION_IN_SCOPE;
bool state = false;
const FixedSizeFunction<sizeof (void*), void (bool&)> fn (toggleBool);
fn (state);
expect (state);
fn (state);
expect (! state);
fn (state);
expect (state);
}
beginTest ("Default constructed functions throw if called");
{
const auto a = FixedSizeFunction<8, void()>();
expectThrowsType (a(), std::bad_function_call)
const auto b = FixedSizeFunction<8, void()> (nullptr);
expectThrowsType (b(), std::bad_function_call)
}
beginTest ("Functions can be moved");
{
JUCE_FAIL_ON_ALLOCATION_IN_SCOPE;
ConstructCounts counts;
auto a = FixedSizeFunction<sizeof (ConstructCounter), void()> (ConstructCounter { counts });
expectEquals (counts, ConstructCounts().withMoves (1).withDestructions (1)); // The temporary gets destroyed
a();
expectEquals (counts, ConstructCounts().withMoves (1).withDestructions (1).withCalls (1));
const auto b = std::move (a);
expectEquals (counts, ConstructCounts().withMoves (2).withDestructions (1).withCalls (1));
b();
expectEquals (counts, ConstructCounts().withMoves (2).withDestructions (1).withCalls (2));
b();
expectEquals (counts, ConstructCounts().withMoves (2).withDestructions (1).withCalls (3));
}
beginTest ("Functions are destructed properly");
{
JUCE_FAIL_ON_ALLOCATION_IN_SCOPE;
ConstructCounts counts;
const ConstructCounter toCopy { counts };
{
auto a = FixedSizeFunction<sizeof (ConstructCounter), void()> (toCopy);
expectEquals (counts, ConstructCounts().withCopies (1));
}
expectEquals (counts, ConstructCounts().withCopies (1).withDestructions (1));
}
beginTest ("Avoid destructing functions that fail to construct");
{
struct BadConstructor
{
explicit BadConstructor (ConstructCounts& c)
: counts (c)
{
counts.constructions += 1;
throw std::runtime_error { "this was meant to happen" };
}
~BadConstructor() noexcept { counts.destructions += 1; }
void operator()() const noexcept { counts.calls += 1; }
ConstructCounts& counts;
};
ConstructCounts counts;
expectThrowsType ((FixedSizeFunction<sizeof (BadConstructor), void()> (BadConstructor { counts })),
std::runtime_error)
expectEquals (counts, ConstructCounts().withConstructions (1));
}
beginTest ("Equality checks work");
{
JUCE_FAIL_ON_ALLOCATION_IN_SCOPE;
FixedSizeFunction<8, void()> a;
expect (! bool (a));
expect (a == nullptr);
expect (nullptr == a);
expect (! (a != nullptr));
expect (! (nullptr != a));
FixedSizeFunction<8, void()> b ([] {});
expect (bool (b));
expect (b != nullptr);
expect (nullptr != b);
expect (! (b == nullptr));
expect (! (nullptr == b));
}
beginTest ("Functions can be cleared");
{
JUCE_FAIL_ON_ALLOCATION_IN_SCOPE;
FixedSizeFunction<8, void()> fn ([] {});
expect (bool (fn));
fn = nullptr;
expect (! bool (fn));
}
beginTest ("Functions can be assigned");
{
JUCE_FAIL_ON_ALLOCATION_IN_SCOPE;
using Fn = FixedSizeFunction<8, void()>;
int numCallsA = 0;
int numCallsB = 0;
Fn x;
Fn y;
expect (! bool (x));
expect (! bool (y));
x = [&] { numCallsA += 1; };
y = [&] { numCallsB += 1; };
expect (bool (x));
expect (bool (y));
x();
expectEquals (numCallsA, 1);
expectEquals (numCallsB, 0);
y();
expectEquals (numCallsA, 1);
expectEquals (numCallsB, 1);
x = std::move (y);
expectEquals (numCallsA, 1);
expectEquals (numCallsB, 1);
x();
expectEquals (numCallsA, 1);
expectEquals (numCallsB, 2);
}
beginTest ("Functions may mutate internal state");
{
JUCE_FAIL_ON_ALLOCATION_IN_SCOPE;
using Fn = FixedSizeFunction<64, void()>;
Fn x;
expect (! bool (x));
int numCalls = 0;
x = [&numCalls, counter = 0]() mutable { counter += 1; numCalls = counter; };
expect (bool (x));
expectEquals (numCalls, 0);
x();
expectEquals (numCalls, 1);
x();
expectEquals (numCalls, 2);
}
beginTest ("Functions can sink move-only parameters");
{
JUCE_FAIL_ON_ALLOCATION_IN_SCOPE;
using Fn = FixedSizeFunction<64, int (std::unique_ptr<int>)>;
auto value = 5;
auto ptr = std::make_unique<int> (value);
Fn fn = [] (std::unique_ptr<int> p) { return *p; };
expect (value == fn (std::move (ptr)));
}
beginTest ("Functions be converted from smaller functions");
{
JUCE_FAIL_ON_ALLOCATION_IN_SCOPE;
using SmallFn = FixedSizeFunction<20, void()>;
using LargeFn = FixedSizeFunction<21, void()>;
bool smallCalled = false;
bool largeCalled = false;
SmallFn small = [&smallCalled, a = std::array<char, 8>{}] { smallCalled = true; juce::ignoreUnused (a); };
LargeFn large = [&largeCalled, a = std::array<char, 8>{}] { largeCalled = true; juce::ignoreUnused (a); };
large = std::move (small);
large();
expect (smallCalled);
expect (! largeCalled);
}
}
};
FixedSizeFunctionTest fixedSizedFunctionTest;
}
}
}
#undef JUCE_FAIL_ON_ALLOCATION_IN_SCOPE

File diff suppressed because it is too large Load diff

View file

@ -22,18 +22,32 @@ namespace dsp
{
/**
Performs stereo uniform-partitioned convolution of an input signal with an
impulse response in the frequency domain, using the juce FFT class.
Performs stereo partitioned convolution of an input signal with an
impulse response in the frequency domain, using the JUCE FFT class.
It provides some thread-safe functions to load impulse responses as well,
from audio files or memory on the fly without any noticeable artefacts,
This class provides some thread-safe functions to load impulse responses
from audio files or memory on-the-fly without noticeable artefacts,
performing resampling and trimming if necessary.
The processing is equivalent to the time domain convolution done in the
class FIRFilter, with a FIRFilter::Coefficients object having as
coefficients the samples of the impulse response. However, it is more
efficient in general to do frequency domain convolution when the size of
the impulse response is higher than 64 samples.
The processing performed by this class is equivalent to the time domain
convolution done in the FIRFilter class, with a FIRFilter::Coefficients
object having the samples of the impulse response as its coefficients.
However, in general it is more efficient to do frequency domain
convolution when the size of the impulse response is 64 samples or
greater.
Note: The default operation of this class uses zero latency and a uniform
partitioned algorithm. If the impulse response size is large, or if the
algorithm is too CPU intensive, it is possible to use either a fixed
latency version of the algorithm, or a simple non-uniform partitioned
convolution algorithm.
Threading: It is not safe to interleave calls to the methods of this
class. If you need to load new impulse responses during processing the
`load` calls must be synchronised with `process` calls, which in practice
means making the `load` call from the audio thread. The
`loadImpulseResponse` functions *are* wait-free and are therefore
suitable for use in a realtime context.
@see FIRFilter, FIRFilter::Coefficients, FFT
@ -46,117 +60,164 @@ public:
/** Initialises an object for performing convolution in the frequency domain. */
Convolution();
/** Destructor. */
~Convolution();
/** Contains configuration information for a convolution with a fixed latency. */
struct Latency { int latencyInSamples; };
/** Initialises an object for performing convolution with a fixed latency.
If the requested latency is zero, the actual latency will also be zero.
For requested latencies greater than zero, the actual latency will
always at least as large as the requested latency. Using a fixed
non-zero latency can reduce the CPU consumption of the convolution
algorithm.
@param requiredLatency the minimum latency
*/
explicit Convolution (const Latency& requiredLatency);
/** Contains configuration information for a non-uniform convolution. */
struct NonUniform { int headSizeInSamples; };
/** Initialises an object for performing convolution in the frequency domain
using a non-uniform partitioned algorithm.
A requiredHeadSize of 256 samples or greater will improve the
efficiency of the processing for IR sizes of 4096 samples or greater
(recommended for reverberation IRs).
@param requiredHeadSize the head IR size for two stage non-uniform
partitioned convolution
*/
explicit Convolution (const NonUniform& requiredHeadSize);
~Convolution() noexcept;
//==============================================================================
/** Must be called before loading any impulse response, to provide to the
convolution the maximumBufferSize to handle, and the sample rate useful for
optional resampling.
/** Must be called before loading any impulse response. This provides the
maximumBufferSize and the sample rate required for any resampling.
*/
void prepare (const ProcessSpec&);
/** Resets the processing pipeline, ready to start a new stream of data. */
/** Resets the processing pipeline ready to start a new stream of data. */
void reset() noexcept;
/** Performs the filter operation on the given set of samples, with optional
/** Performs the filter operation on the given set of samples with optional
stereo processing.
*/
template <typename ProcessContext>
template <typename ProcessContext,
std::enable_if_t<std::is_same<typename ProcessContext::SampleType, float>::value, int> = 0>
void process (const ProcessContext& context) noexcept
{
static_assert (std::is_same<typename ProcessContext::SampleType, float>::value,
"Convolution engine only supports single precision floating point data");
processSamples (context.getInputBlock(), context.getOutputBlock(), context.isBypassed);
}
//==============================================================================
enum class Stereo { yes, no };
enum class Trim { yes, no };
enum class Normalise { yes, no };
//==============================================================================
/** This function loads an impulse response audio file from memory, added in a
JUCE project with the Projucer as binary data. It can load any of the audio
formats registered in JUCE, and performs some resampling and pre-processing
as well if needed.
Note: Obviously, don't try to use this function on float samples, since the
data is supposed to be an audio file in its binary format, and be sure that
the original data is not going to move at all its memory location during the
process !!
Note: Don't try to use this function on float samples, since the data is
expected to be an audio file in its binary format. Be sure that the original
data remains constant throughout the lifetime of the Convolution object, as
the loading process will happen on a background thread once this function has
returned.
@param sourceData the block of data to use as the stream's source
@param sourceDataSize the number of bytes in the source data block
@param wantsStereo requests to process both stereo channels or only one mono channel
@param wantsTrimming requests to trim the start and the end of the impulse response
@param isStereo selects either stereo or mono
@param requiresTrimming optionally trim the start and the end of the impulse response
@param size the expected size for the impulse response after loading, can be
set to 0 for requesting maximum original impulse response size
@param wantsNormalisation requests to normalise the impulse response amplitude
set to 0 to requesting the original impulse response size
@param requiresNormalisation optionally normalise the impulse response amplitude
*/
void loadImpulseResponse (const void* sourceData, size_t sourceDataSize,
bool wantsStereo, bool wantsTrimming, size_t size,
bool wantsNormalisation = true);
Stereo isStereo, Trim requiresTrimming, size_t size,
Normalise requiresNormalisation = Normalise::yes);
/** This function loads an impulse response from an audio file on any drive. It
can load any of the audio formats registered in JUCE, and performs some
resampling and pre-processing as well if needed.
/** This function loads an impulse response from an audio file. It can load any
of the audio formats registered in JUCE, and performs some resampling and
pre-processing as well if needed.
@param fileImpulseResponse the location of the audio file
@param wantsStereo requests to process both stereo channels or only one mono channel
@param wantsTrimming requests to trim the start and the end of the impulse response
@param isStereo selects either stereo or mono
@param requiresTrimming optionally trim the start and the end of the impulse response
@param size the expected size for the impulse response after loading, can be
set to 0 for requesting maximum original impulse response size
@param wantsNormalisation requests to normalise the impulse response amplitude
set to 0 to requesting the original impulse response size
@param requiresNormalisation optionally normalise the impulse response amplitude
*/
void loadImpulseResponse (const File& fileImpulseResponse,
bool wantsStereo, bool wantsTrimming, size_t size,
bool wantsNormalisation = true);
Stereo isStereo, Trim requiresTrimming, size_t size,
Normalise requiresNormalisation = Normalise::yes);
/** This function loads an impulse response from an audio buffer, which is
copied before doing anything else. Performs some resampling and
pre-processing as well if needed.
/** This function loads an impulse response from an audio buffer.
To avoid memory allocation on the audio thread, this function takes
ownership of the buffer passed in.
If calling this function during processing, make sure that the buffer is
not allocated on the audio thread (be careful of accidental copies!).
If you need to pass arbitrary/generated buffers it's recommended to
create these buffers on a separate thread and to use some wait-free
construct (a lock-free queue or a SpinLock/GenericScopedTryLock combination)
to transfer ownership to the audio thread without allocating.
@param buffer the AudioBuffer to use
@param bufferSampleRate the sampleRate of the data in the AudioBuffer
@param wantsStereo requests to process both stereo channels or only one mono channel
@param wantsTrimming requests to trim the start and the end of the impulse response
@param wantsNormalisation requests to normalise the impulse response amplitude
@param size the expected size for the impulse response after loading, can be
set to 0 for requesting maximum original impulse response size
@param isStereo selects either stereo or mono
@param requiresTrimming optionally trim the start and the end of the impulse response
@param requiresNormalisation optionally normalise the impulse response amplitude
*/
void copyAndLoadImpulseResponseFromBuffer (AudioBuffer<float>& buffer, double bufferSampleRate,
bool wantsStereo, bool wantsTrimming, bool wantsNormalisation,
size_t size);
void loadImpulseResponse (AudioBuffer<float>&& buffer, double bufferSampleRate,
Stereo isStereo, Trim requiresTrimming, Normalise requiresNormalisation);
/** This function loads an impulse response from an audio block, which is
copied before doing anything else. Performs some resampling and
pre-processing as well if needed.
/** This function returns the size of the current IR in samples. */
int getCurrentIRSize() const;
@param block the AudioBlock to use
@param bufferSampleRate the sampleRate of the data in the AudioBuffer
@param wantsStereo requests to process both stereo channels or only one channel
@param wantsTrimming requests to trim the start and the end of the impulse response
@param wantsNormalisation requests to normalise the impulse response amplitude
@param size the expected size for the impulse response after loading,
-1 for maximum length
/** This function returns the current latency of the process in samples.
Note: This is the latency of the convolution engine, not the latency
associated with the current impulse response choice that has to be
considered separately (linear phase filters, for eaxmple).
*/
void copyAndLoadImpulseResponseFromBlock (AudioBlock<float> block, double bufferSampleRate,
bool wantsStereo, bool wantsTrimming, bool wantsNormalisation,
size_t size);
int getLatency() const;
private:
//==============================================================================
struct Pimpl;
std::unique_ptr<Pimpl> pimpl;
//==============================================================================
void processSamples (const AudioBlock<const float>&, AudioBlock<float>&, bool isBypassed) noexcept;
//==============================================================================
double sampleRate;
class Mixer
{
public:
void prepare (const ProcessSpec&);
template <typename ProcessWet>
void processSamples (const AudioBlock<const float>&,
AudioBlock<float>&,
bool isBypassed,
ProcessWet&&) noexcept;
void reset();
private:
std::array<SmoothedValue<float>, 2> volumeDry, volumeWet;
AudioBlock<float> dryBlock;
HeapBlock<char> dryBlockStorage;
double sampleRate = 0;
bool currentIsBypassed = false;
};
//==============================================================================
class Impl;
std::unique_ptr<Impl> pimpl;
//==============================================================================
Mixer mixer;
bool isActive = false;
SmoothedValue<float> volumeDry[2], volumeWet[2];
AudioBlock<float> dryBuffer;
HeapBlock<char> dryBufferStorage;
//==============================================================================
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Convolution)

View file

@ -0,0 +1,512 @@
/*
==============================================================================
This file is part of the JUCE 6 technical preview.
Copyright (c) 2020 - Raw Material Software Limited
You may use this code under the terms of the GPL v3
(see www.gnu.org/licenses).
For this technical preview, this file is not subject to commercial licensing.
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
DISCLAIMED.
==============================================================================
*/
#if JUCE_ENABLE_ALLOCATION_HOOKS
#define JUCE_FAIL_ON_ALLOCATION_IN_SCOPE const UnitTestAllocationChecker checker (*this)
#else
#define JUCE_FAIL_ON_ALLOCATION_IN_SCOPE
#endif
namespace juce
{
namespace dsp
{
namespace
{
class ConvolutionTest : public UnitTest
{
template <typename Callback>
static void nTimes (int n, Callback&& callback)
{
for (auto i = 0; i < n; ++i)
callback();
}
static AudioBuffer<float> makeRamp (int length)
{
AudioBuffer<float> result (1, length);
result.clear();
const auto writePtr = result.getWritePointer (0);
std::fill (writePtr, writePtr + length, 1.0f);
result.applyGainRamp (0, length, 1.0f, 0.0f);
return result;
}
static AudioBuffer<float> makeStereoRamp (int length)
{
AudioBuffer<float> result (2, length);
result.clear();
auto** channels = result.getArrayOfWritePointers();
std::for_each (channels, channels + result.getNumChannels(), [&] (auto* channel)
{
std::fill (channel, channel + length, 1.0f);
});
result.applyGainRamp (0, 0, length, 1.0f, 0.0f);
result.applyGainRamp (1, 0, length, 0.0f, 1.0f);
return result;
}
static void addDiracImpulse (const AudioBlock<float>& block)
{
block.clear();
for (size_t channel = 0; channel != block.getNumChannels(); ++channel)
block.setSample ((int) channel, 0, 1.0f);
}
void checkForNans (const AudioBlock<float>& block)
{
for (size_t channel = 0; channel != block.getNumChannels(); ++channel)
for (size_t sample = 0; sample != block.getNumSamples(); ++sample)
expect (! std::isnan (block.getSample ((int) channel, (int) sample)));
}
template <typename T>
void nonAllocatingExpectWithinAbsoluteError (const T& a, const T& b, const T& error)
{
expect (std::abs (a - b) < error);
}
enum class InitSequence { prepareThenLoad, loadThenPrepare };
void checkLatency (const Convolution& convolution, const Convolution::Latency& latency)
{
const auto reportedLatency = convolution.getLatency();
if (latency.latencyInSamples == 0)
expect (reportedLatency == 0);
expect (reportedLatency >= latency.latencyInSamples);
}
void checkLatency (const Convolution&, const Convolution::NonUniform&) {}
template <typename ConvolutionConfig>
void testConvolution (const ProcessSpec& spec,
const ConvolutionConfig& config,
const AudioBuffer<float>& ir,
double irSampleRate,
Convolution::Stereo stereo,
Convolution::Trim trim,
Convolution::Normalise normalise,
const AudioBlock<const float>& expectedResult,
InitSequence initSequence)
{
AudioBuffer<float> buffer (static_cast<int> (spec.numChannels),
static_cast<int> (spec.maximumBlockSize));
AudioBlock<float> block { buffer };
ProcessContextReplacing<float> context { block };
const auto numBlocksPerSecond = (int) std::ceil (spec.sampleRate / spec.maximumBlockSize);
const auto numBlocksForImpulse = (int) std::ceil ((double) expectedResult.getNumSamples() / spec.maximumBlockSize);
AudioBuffer<float> outBuffer (static_cast<int> (spec.numChannels),
numBlocksForImpulse * static_cast<int> (spec.maximumBlockSize));
Convolution convolution (config);
auto copiedIr = ir;
if (initSequence == InitSequence::loadThenPrepare)
convolution.loadImpulseResponse (std::move (copiedIr), irSampleRate, stereo, trim, normalise);
convolution.prepare (spec);
JUCE_FAIL_ON_ALLOCATION_IN_SCOPE;
if (initSequence == InitSequence::prepareThenLoad)
convolution.loadImpulseResponse (std::move (copiedIr), irSampleRate, stereo, trim, normalise);
checkLatency (convolution, config);
auto processBlocksWithDiracImpulse = [&]
{
for (auto i = 0; i != numBlocksForImpulse; ++i)
{
if (i == 0)
addDiracImpulse (block);
else
block.clear();
convolution.process (context);
for (auto c = 0; c != static_cast<int> (spec.numChannels); ++c)
{
outBuffer.copyFrom (c,
i * static_cast<int> (spec.maximumBlockSize),
block.getChannelPointer (static_cast<size_t> (c)),
static_cast<int> (spec.maximumBlockSize));
}
}
};
const auto time = Time::getMillisecondCounter();
// Wait 10 seconds to load the impulse response
while (Time::getMillisecondCounter() - time < 10'000)
{
processBlocksWithDiracImpulse();
// Check if the impulse response was loaded
if (block.getSample (0, 1) != 0.0f)
break;
}
// At this point, our convolution should be loaded and the current IR size should
// match the expected result size
expect (convolution.getCurrentIRSize() == static_cast<int> (expectedResult.getNumSamples()));
// Make sure we get any smoothing out of the way
nTimes (numBlocksPerSecond, processBlocksWithDiracImpulse);
nTimes (5, [&]
{
processBlocksWithDiracImpulse();
const auto actualLatency = static_cast<size_t> (convolution.getLatency());
// The output should be the same as the IR
for (size_t c = 0; c != static_cast<size_t> (expectedResult.getNumChannels()); ++c)
{
for (size_t i = 0; i != static_cast<size_t> (expectedResult.getNumSamples()); ++i)
{
const auto equivalentSample = i + actualLatency;
if (static_cast<int> (equivalentSample) >= outBuffer.getNumSamples())
continue;
nonAllocatingExpectWithinAbsoluteError (outBuffer.getSample ((int) c, (int) equivalentSample),
expectedResult.getSample ((int) c, (int) i),
0.01f);
}
}
});
}
template <typename ConvolutionConfig>
void testConvolution (const ProcessSpec& spec,
const ConvolutionConfig& config,
const AudioBuffer<float>& ir,
double irSampleRate,
Convolution::Stereo stereo,
Convolution::Trim trim,
Convolution::Normalise normalise,
const AudioBlock<const float>& expectedResult)
{
for (const auto sequence : { InitSequence::prepareThenLoad, InitSequence::loadThenPrepare })
testConvolution (spec, config, ir, irSampleRate, stereo, trim, normalise, expectedResult, sequence);
}
public:
ConvolutionTest()
: UnitTest ("Convolution", UnitTestCategories::dsp)
{}
void runTest() override
{
const ProcessSpec spec { 44100.0, 512, 2 };
AudioBuffer<float> buffer (static_cast<int> (spec.numChannels),
static_cast<int> (spec.maximumBlockSize));
AudioBlock<float> block { buffer };
ProcessContextReplacing<float> context { block };
const auto impulseData = [&]
{
Random random;
AudioBuffer<float> result (2, 1000);
for (auto channel = 0; channel != result.getNumChannels(); ++channel)
for (auto sample = 0; sample != result.getNumSamples(); ++sample)
result.setSample (channel, sample, random.nextFloat());
return result;
}();
beginTest ("Impulse responses can be loaded without allocating on the audio thread");
{
Convolution convolution;
convolution.prepare (spec);
auto copy = impulseData;
JUCE_FAIL_ON_ALLOCATION_IN_SCOPE;
nTimes (100, [&]
{
convolution.loadImpulseResponse (std::move (copy),
1000,
Convolution::Stereo::yes,
Convolution::Trim::yes,
Convolution::Normalise::no);
addDiracImpulse (block);
convolution.process (context);
checkForNans (block);
});
}
beginTest ("Convolution can be reset without allocating on the audio thread");
{
Convolution convolution;
convolution.prepare (spec);
auto copy = impulseData;
convolution.loadImpulseResponse (std::move (copy),
1000,
Convolution::Stereo::yes,
Convolution::Trim::yes,
Convolution::Normalise::yes);
JUCE_FAIL_ON_ALLOCATION_IN_SCOPE;
nTimes (100, [&]
{
addDiracImpulse (block);
convolution.reset();
convolution.process (context);
convolution.reset();
});
checkForNans (block);
}
beginTest ("Completely empty IRs don't crash");
{
AudioBuffer<float> emptyBuffer;
Convolution convolution;
convolution.prepare (spec);
auto copy = impulseData;
convolution.loadImpulseResponse (std::move (copy),
2000,
Convolution::Stereo::yes,
Convolution::Trim::yes,
Convolution::Normalise::yes);
JUCE_FAIL_ON_ALLOCATION_IN_SCOPE;
nTimes (100, [&]
{
addDiracImpulse (block);
convolution.reset();
convolution.process (context);
convolution.reset();
});
checkForNans (block);
}
beginTest ("Short uniform convolutions work");
{
const auto ramp = makeRamp (static_cast<int> (spec.maximumBlockSize) / 2);
testConvolution (spec,
Convolution::Latency { 0 },
ramp,
spec.sampleRate,
Convolution::Stereo::yes,
Convolution::Trim::yes,
Convolution::Normalise::no,
ramp);
}
beginTest ("Longer uniform convolutions work");
{
const auto ramp = makeRamp (static_cast<int> (spec.maximumBlockSize) * 8);
testConvolution (spec,
Convolution::Latency { 0 },
ramp,
spec.sampleRate,
Convolution::Stereo::yes,
Convolution::Trim::yes,
Convolution::Normalise::no,
ramp);
}
beginTest ("Normalisation works");
{
const auto ramp = makeRamp (static_cast<int> (spec.maximumBlockSize) * 8);
auto copy = ramp;
const auto channels = copy.getArrayOfWritePointers();
const auto numChannels = copy.getNumChannels();
const auto numSamples = copy.getNumSamples();
const auto factor = 0.125f / std::sqrt (std::accumulate (channels, channels + numChannels, 0.0f, [&] (auto max, auto* channel)
{
return juce::jmax (max, std::accumulate (channel, channel + numSamples, 0.0f, [] (auto sum, auto sample)
{
return sum + sample * sample;
}));
}));
std::for_each (channels, channels + numChannels, [&] (auto* channel)
{
FloatVectorOperations::multiply (channel, factor, numSamples);
});
testConvolution (spec,
Convolution::Latency { 0 },
ramp,
spec.sampleRate,
Convolution::Stereo::yes,
Convolution::Trim::yes,
Convolution::Normalise::yes,
copy);
}
beginTest ("Stereo convolutions work");
{
const auto ramp = makeStereoRamp (static_cast<int> (spec.maximumBlockSize) * 5);
testConvolution (spec,
Convolution::Latency { 0 },
ramp,
spec.sampleRate,
Convolution::Stereo::yes,
Convolution::Trim::yes,
Convolution::Normalise::no,
ramp);
}
beginTest ("Stereo IRs only use first channel if stereo is disabled");
{
const auto length = static_cast<int> (spec.maximumBlockSize) * 5;
const auto ramp = makeStereoRamp (length);
const float* channels[] { ramp.getReadPointer (0), ramp.getReadPointer (0) };
testConvolution (spec,
Convolution::Latency { 0 },
ramp,
spec.sampleRate,
Convolution::Stereo::no,
Convolution::Trim::yes,
Convolution::Normalise::no,
AudioBlock<const float> (channels, numElementsInArray (channels), length));
}
beginTest ("IRs with extra silence are trimmed appropriately");
{
const auto length = static_cast<int> (spec.maximumBlockSize) * 3;
const auto ramp = makeRamp (length);
AudioBuffer<float> paddedRamp (ramp.getNumChannels(), ramp.getNumSamples() * 2);
paddedRamp.clear();
const auto offset = (paddedRamp.getNumSamples() - ramp.getNumSamples()) / 2;
for (auto channel = 0; channel != ramp.getNumChannels(); ++channel)
paddedRamp.copyFrom (channel, offset, ramp.getReadPointer (channel), length);
testConvolution (spec,
Convolution::Latency { 0 },
paddedRamp,
spec.sampleRate,
Convolution::Stereo::no,
Convolution::Trim::yes,
Convolution::Normalise::no,
ramp);
}
beginTest ("IRs are resampled if their sample rate is different to the playback rate");
{
for (const auto resampleRatio : { 0.1, 0.5, 2.0, 10.0 })
{
const auto length = static_cast<int> (spec.maximumBlockSize) * 2;
const auto ramp = makeStereoRamp (length);
const auto resampled = [&]
{
AudioBuffer<float> original = ramp;
MemoryAudioSource memorySource (original, false);
ResamplingAudioSource resamplingSource (&memorySource, false, original.getNumChannels());
const auto finalSize = roundToInt (original.getNumSamples() / resampleRatio);
resamplingSource.setResamplingRatio (resampleRatio);
resamplingSource.prepareToPlay (finalSize, spec.sampleRate * resampleRatio);
AudioBuffer<float> result (original.getNumChannels(), finalSize);
resamplingSource.getNextAudioBlock ({ &result, 0, result.getNumSamples() });
return result;
}();
testConvolution (spec,
Convolution::Latency { 0 },
ramp,
spec.sampleRate * resampleRatio,
Convolution::Stereo::yes,
Convolution::Trim::yes,
Convolution::Normalise::no,
resampled);
}
}
beginTest ("Non-uniform convolutions work");
{
const auto ramp = makeRamp (static_cast<int> (spec.maximumBlockSize) * 8);
for (auto headSize : { spec.maximumBlockSize / 2, spec.maximumBlockSize, spec.maximumBlockSize * 9 })
{
testConvolution (spec,
Convolution::NonUniform { static_cast<int> (headSize) },
ramp,
spec.sampleRate,
Convolution::Stereo::yes,
Convolution::Trim::yes,
Convolution::Normalise::no,
ramp);
}
}
beginTest ("Convolutions with latency work");
{
const auto ramp = makeRamp (static_cast<int> (spec.maximumBlockSize) * 8);
using BlockSize = decltype (spec.maximumBlockSize);
for (auto latency : { /*static_cast<BlockSize> (0),
spec.maximumBlockSize / 3,
spec.maximumBlockSize,
spec.maximumBlockSize * 2, */
static_cast<BlockSize> (spec.maximumBlockSize * 2.5) })
{
testConvolution (spec,
Convolution::Latency { static_cast<int> (latency) },
ramp,
spec.sampleRate,
Convolution::Stereo::yes,
Convolution::Trim::yes,
Convolution::Normalise::no,
ramp);
}
}
}
};
ConvolutionTest convolutionUnitTest;
}
}
}
#undef JUCE_FAIL_ON_ALLOCATION_IN_SCOPE

View file

@ -47,6 +47,8 @@
#define JUCE_IPP_AVAILABLE 1
#endif
#include "containers/juce_FixedSizeFunction.h"
#include "processors/juce_FIRFilter.cpp"
#include "processors/juce_IIRFilter.cpp"
#include "processors/juce_FirstOrderTPTFilter.cpp"
@ -94,6 +96,8 @@
#endif
#include "containers/juce_AudioBlock_test.cpp"
#include "containers/juce_FixedSizeFunction_test.cpp"
#include "frequency/juce_Convolution_test.cpp"
#include "frequency/juce_FFT_test.cpp"
#include "processors/juce_FIRFilter_test.cpp"
#include "processors/juce_ProcessorChain_test.cpp"