Browse Source

ProcessSpec: Add equality operators

v6.1.6
reuk 4 years ago
parent
commit
28a1bc54f9
No known key found for this signature in database GPG Key ID: 9ADCD339CFC98A11
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      modules/juce_dsp/processors/juce_ProcessContext.h

+ 9
- 0
modules/juce_dsp/processors/juce_ProcessContext.h View File

@@ -46,6 +46,15 @@ struct ProcessSpec
uint32 numChannels; uint32 numChannels;
}; };
constexpr bool operator== (const ProcessSpec& a, const ProcessSpec& b)
{
return a.sampleRate == b.sampleRate
&& a.maximumBlockSize == b.maximumBlockSize
&& a.numChannels == b.numChannels;
}
constexpr bool operator!= (const ProcessSpec& a, const ProcessSpec& b) { return ! (a == b); }
//============================================================================== //==============================================================================
/** /**
This is a handy base class for the state of a processor (such as parameter values) This is a handy base class for the state of a processor (such as parameter values)


Loading…
Cancel
Save