mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
AudioTransportSource: hasStreamFinished returns true when stream finished
This commit is contained in:
parent
6f4a2f6b6a
commit
b7d0364e69
2 changed files with 26 additions and 3 deletions
|
|
@ -168,9 +168,13 @@ double AudioTransportSource::getLengthInSeconds() const
|
|||
|
||||
bool AudioTransportSource::hasStreamFinished() const noexcept
|
||||
{
|
||||
return positionableSource == nullptr
|
||||
|| (positionableSource->getNextReadPosition() > positionableSource->getTotalLength() + 1
|
||||
&& ! positionableSource->isLooping());
|
||||
if (positionableSource == nullptr)
|
||||
return true;
|
||||
|
||||
if (positionableSource->isLooping())
|
||||
return false;
|
||||
|
||||
return positionableSource->getNextReadPosition() >= positionableSource->getTotalLength();
|
||||
}
|
||||
|
||||
void AudioTransportSource::setNextReadPosition (int64 newPosition)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue