diff --git a/modules/juce_audio_basics/audio_play_head/juce_AudioPlayHead.h b/modules/juce_audio_basics/audio_play_head/juce_AudioPlayHead.h index f12ea65d11..ebbb68d931 100644 --- a/modules/juce_audio_basics/audio_play_head/juce_AudioPlayHead.h +++ b/modules/juce_audio_basics/audio_play_head/juce_AudioPlayHead.h @@ -122,10 +122,35 @@ public: bool isLooping; //============================================================================== - bool operator== (const CurrentPositionInfo& other) const noexcept; - bool operator!= (const CurrentPositionInfo& other) const noexcept; + bool operator== (const CurrentPositionInfo& other) const noexcept + { + return timeInSamples == other.timeInSamples + && ppqPosition == other.ppqPosition + && editOriginTime == other.editOriginTime + && ppqPositionOfLastBarStart == other.ppqPositionOfLastBarStart + && frameRate == other.frameRate + && isPlaying == other.isPlaying + && isRecording == other.isRecording + && bpm == other.bpm + && timeSigNumerator == other.timeSigNumerator + && timeSigDenominator == other.timeSigDenominator + && ppqLoopStart == other.ppqLoopStart + && ppqLoopEnd == other.ppqLoopEnd + && isLooping == other.isLooping; + } - void resetToDefault(); + bool operator!= (const CurrentPositionInfo& other) const noexcept + { + return ! operator== (other); + } + + void resetToDefault() + { + zerostruct (*this); + timeSigNumerator = 4; + timeSigDenominator = 4; + bpm = 120; + } }; //============================================================================== diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp b/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp index caa55b6180..c805991315 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp +++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp @@ -1563,35 +1563,4 @@ void AudioProcessorParameter::removeListener (AudioProcessorParameter::Listener* listeners.removeFirstMatchingValue (listenerToRemove); } -//============================================================================== -bool AudioPlayHead::CurrentPositionInfo::operator== (const CurrentPositionInfo& other) const noexcept -{ - return timeInSamples == other.timeInSamples - && ppqPosition == other.ppqPosition - && editOriginTime == other.editOriginTime - && ppqPositionOfLastBarStart == other.ppqPositionOfLastBarStart - && frameRate == other.frameRate - && isPlaying == other.isPlaying - && isRecording == other.isRecording - && bpm == other.bpm - && timeSigNumerator == other.timeSigNumerator - && timeSigDenominator == other.timeSigDenominator - && ppqLoopStart == other.ppqLoopStart - && ppqLoopEnd == other.ppqLoopEnd - && isLooping == other.isLooping; -} - -bool AudioPlayHead::CurrentPositionInfo::operator!= (const CurrentPositionInfo& other) const noexcept -{ - return ! operator== (other); -} - -void AudioPlayHead::CurrentPositionInfo::resetToDefault() -{ - zerostruct (*this); - timeSigNumerator = 4; - timeSigDenominator = 4; - bpm = 120; -} - } // namespace juce