this use of getSourcePosition is wrong (sourcePosition is not increased if e.g. the voice is a generator for example)
To avoid this I removed the API which has really no purpose
This commit is contained in:
parent
7933bcec8d
commit
6156022628
3 changed files with 1 additions and 12 deletions
|
|
@ -1018,7 +1018,7 @@ void sfz::Synth::checkNotePolyphony(const Region* region, int delay, const Trigg
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SfzSelfMask::dontMask:
|
case SfzSelfMask::dontMask:
|
||||||
if (!selfMaskCandidate || selfMaskCandidate->getSourcePosition() < voice->getSourcePosition())
|
if (!selfMaskCandidate || selfMaskCandidate->getAge() < voice->getAge())
|
||||||
selfMaskCandidate = voice;
|
selfMaskCandidate = voice;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -856,11 +856,6 @@ bool sfz::Voice::releasedOrFree() const noexcept
|
||||||
return state != State::playing || egAmplitude.isReleased();
|
return state != State::playing || egAmplitude.isReleased();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t sfz::Voice::getSourcePosition() const noexcept
|
|
||||||
{
|
|
||||||
return sourcePosition;
|
|
||||||
}
|
|
||||||
|
|
||||||
void sfz::Voice::setMaxFiltersPerVoice(size_t numFilters)
|
void sfz::Voice::setMaxFiltersPerVoice(size_t numFilters)
|
||||||
{
|
{
|
||||||
if (numFilters == filters.size())
|
if (numFilters == filters.size())
|
||||||
|
|
|
||||||
|
|
@ -248,12 +248,6 @@ public:
|
||||||
* @return float
|
* @return float
|
||||||
*/
|
*/
|
||||||
float getAveragePower() const noexcept;
|
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!
|
* Returns the region that is currently playing. May be null if the voice is not active!
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue