diff --git a/src/sfizz/Synth.cpp b/src/sfizz/Synth.cpp index b191d841..2d8b01d6 100644 --- a/src/sfizz/Synth.cpp +++ b/src/sfizz/Synth.cpp @@ -1018,7 +1018,7 @@ void sfz::Synth::checkNotePolyphony(const Region* region, int delay, const Trigg } break; case SfzSelfMask::dontMask: - if (!selfMaskCandidate || selfMaskCandidate->getSourcePosition() < voice->getSourcePosition()) + if (!selfMaskCandidate || selfMaskCandidate->getAge() < voice->getAge()) selfMaskCandidate = voice; break; } diff --git a/src/sfizz/Voice.cpp b/src/sfizz/Voice.cpp index 4a0fc5b0..4afc7bc2 100644 --- a/src/sfizz/Voice.cpp +++ b/src/sfizz/Voice.cpp @@ -856,11 +856,6 @@ bool sfz::Voice::releasedOrFree() const noexcept return state != State::playing || egAmplitude.isReleased(); } -uint32_t sfz::Voice::getSourcePosition() const noexcept -{ - return sourcePosition; -} - void sfz::Voice::setMaxFiltersPerVoice(size_t numFilters) { if (numFilters == filters.size()) diff --git a/src/sfizz/Voice.h b/src/sfizz/Voice.h index 9d5bfceb..70e5fb74 100644 --- a/src/sfizz/Voice.h +++ b/src/sfizz/Voice.h @@ -248,12 +248,6 @@ public: * @return float */ float getAveragePower() const noexcept; - /** - * @brief Get the position of the voice in the source, in samples - * - * @return uint32_t - */ - uint32_t getSourcePosition() const noexcept; /** * Returns the region that is currently playing. May be null if the voice is not active! *