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

DSP: Added an assertion to protect against invalid use of ProcessContextNonReplacing

This commit is contained in:
Tom Poole 2019-03-01 11:56:06 +00:00
parent 1bc7fdd1ec
commit 9f344aaa5a
2 changed files with 20 additions and 1 deletions

View file

@ -151,6 +151,20 @@ public:
AudioBlock (const AudioBlock& other) noexcept = default;
AudioBlock& operator= (const AudioBlock& other) noexcept = default;
//==============================================================================
bool operator== (const AudioBlock& other) const noexcept
{
return std::equal (channels, channels + numChannels,
other.channels, other.channels + other.numChannels)
&& startSample == other.startSample
&& numSamples == other.numSamples;
}
bool operator!= (const AudioBlock& other) const noexcept
{
return ! (*this == other);
}
//==============================================================================
forcedinline size_t getNumSamples() const noexcept { return numSamples; }
forcedinline size_t getNumChannels() const noexcept { return static_cast<size_t> (numChannels); }