| @@ -616,9 +616,9 @@ public: | |||
| const auto previewDimmed = previewedRegion->getAudioModification<ARADemoPluginAudioModification>() | |||
| ->isDimmed(); | |||
| if (lastPreviewTime != previewTime | |||
| || lastPlaybackRegion != previewedRegion | |||
| || lastPreviewDimmed != previewDimmed) | |||
| if (! exactlyEqual (lastPreviewTime, previewTime) | |||
| || ! exactlyEqual (lastPlaybackRegion, previewedRegion) | |||
| || ! exactlyEqual (lastPreviewDimmed, previewDimmed)) | |||
| { | |||
| Range<double> previewRangeInPlaybackTime { previewTime - 0.25, previewTime + 0.25 }; | |||
| previewBuffer->clear(); | |||
| @@ -1102,7 +1102,7 @@ public: | |||
| const auto quarterPos = barSignaturesConverter.getQuarterForBeat (beat); | |||
| const int x = timeToViewScaling.getXForTime (tempoConverter.getTimeForQuarter (quarterPos)); | |||
| const auto barSignature = barSignaturesConverter.getBarSignatureForQuarter (quarterPos); | |||
| const int lineWidth = (quarterPos == barSignature.position) ? heavyLineWidth : lightLineWidth; | |||
| const int lineWidth = (approximatelyEqual (quarterPos, barSignature.position)) ? heavyLineWidth : lightLineWidth; | |||
| const int beatsSinceBarStart = roundToInt( barSignaturesConverter.getBeatDistanceFromBarStartForQuarter (quarterPos)); | |||
| const int lineHeight = (beatsSinceBarStart == 0) ? rulerHeight : rulerHeight / 2; | |||
| rects.addWithoutMerging (Rectangle<int> (x - lineWidth / 2, 2 * rulerHeight - lineHeight, lineWidth, lineHeight)); | |||
| @@ -850,7 +850,7 @@ public: | |||
| jassert (destStartSample >= 0 && numSamples >= 0 && destStartSample + numSamples <= size); | |||
| jassert (source != nullptr); | |||
| if (gainToApplyToSource != 0 && numSamples > 0) | |||
| if (! approximatelyEqual (gainToApplyToSource, Type()) && numSamples > 0) | |||
| { | |||
| auto* d = channels[destChannel] + destStartSample; | |||
| @@ -858,14 +858,14 @@ public: | |||
| { | |||
| isClear = false; | |||
| if (gainToApplyToSource != Type (1)) | |||
| if (! approximatelyEqual (gainToApplyToSource, Type (1))) | |||
| FloatVectorOperations::copyWithMultiply (d, source, gainToApplyToSource, numSamples); | |||
| else | |||
| FloatVectorOperations::copy (d, source, numSamples); | |||
| } | |||
| else | |||
| { | |||
| if (gainToApplyToSource != Type (1)) | |||
| if (! approximatelyEqual (gainToApplyToSource, Type (1))) | |||
| FloatVectorOperations::addWithMultiply (d, source, gainToApplyToSource, numSamples); | |||
| else | |||
| FloatVectorOperations::add (d, source, numSamples); | |||
| @@ -899,7 +899,7 @@ public: | |||
| Type startGain, | |||
| Type endGain) noexcept | |||
| { | |||
| if (startGain == endGain) | |||
| if (approximatelyEqual (startGain, endGain)) | |||
| { | |||
| addFrom (destChannel, destStartSample, source, numSamples, startGain); | |||
| } | |||
| @@ -1023,9 +1023,9 @@ public: | |||
| { | |||
| auto* d = channels[destChannel] + destStartSample; | |||
| if (gain != Type (1)) | |||
| if (! approximatelyEqual (gain, Type (1))) | |||
| { | |||
| if (gain == Type()) | |||
| if (approximatelyEqual (gain, Type())) | |||
| { | |||
| if (! isClear) | |||
| FloatVectorOperations::clear (d, numSamples); | |||
| @@ -1071,7 +1071,7 @@ public: | |||
| Type startGain, | |||
| Type endGain) noexcept | |||
| { | |||
| if (startGain == endGain) | |||
| if (approximatelyEqual (startGain, endGain)) | |||
| { | |||
| copyFrom (destChannel, destStartSample, source, numSamples, startGain); | |||
| } | |||
| @@ -67,7 +67,7 @@ void ARAAudioSourceReader::willUpdateAudioSourceProperties (ARAAudioSource* audi | |||
| ARAAudioSource::PropertiesPtr newProperties) | |||
| { | |||
| if (audioSource->getSampleCount() != newProperties->sampleCount | |||
| || audioSource->getSampleRate() != newProperties->sampleRate | |||
| || ! exactlyEqual (audioSource->getSampleRate(), newProperties->sampleRate) | |||
| || audioSource->getChannelCount() != newProperties->channelCount) | |||
| { | |||
| invalidate(); | |||
| @@ -277,10 +277,10 @@ void ARAPlaybackRegionReader::willUpdatePlaybackRegionProperties (ARAPlaybackReg | |||
| { | |||
| jassert (ARA::contains (playbackRenderer->getPlaybackRegions(), playbackRegion)); | |||
| if ((playbackRegion->getStartInAudioModificationTime() != newProperties->startInModificationTime) | |||
| || (playbackRegion->getDurationInAudioModificationTime() != newProperties->durationInModificationTime) | |||
| || (playbackRegion->getStartInPlaybackTime() != newProperties->startInPlaybackTime) | |||
| || (playbackRegion->getDurationInPlaybackTime() != newProperties->durationInPlaybackTime) | |||
| if ((! exactlyEqual (playbackRegion->getStartInAudioModificationTime(), newProperties->startInModificationTime)) | |||
| || ! exactlyEqual (playbackRegion->getDurationInAudioModificationTime(), newProperties->durationInModificationTime) | |||
| || ! exactlyEqual (playbackRegion->getStartInPlaybackTime(), newProperties->startInPlaybackTime) | |||
| || ! exactlyEqual (playbackRegion->getDurationInPlaybackTime(), newProperties->durationInPlaybackTime) | |||
| || (playbackRegion->isTimestretchEnabled() != ((newProperties->transformationFlags & ARA::kARAPlaybackTransformationTimestretch) != 0)) | |||
| || (playbackRegion->isTimeStretchReflectingTempo() != ((newProperties->transformationFlags & ARA::kARAPlaybackTransformationTimestretchReflectingTempo) != 0)) | |||
| || (playbackRegion->hasContentBasedFadeAtHead() != ((newProperties->transformationFlags & ARA::kARAPlaybackTransformationContentBasedFadeAtHead) != 0)) | |||
| @@ -27,7 +27,8 @@ | |||
| // Include ARA SDK headers | |||
| JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wgnu-zero-variadic-macro-arguments", | |||
| "-Wunused-parameter") | |||
| "-Wunused-parameter", | |||
| "-Wfloat-equal") | |||
| JUCE_BEGIN_IGNORE_WARNINGS_MSVC (6387) | |||
| #include <ARA_Library/PlugIn/ARAPlug.h> | |||