mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +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
|
|
@ -2,6 +2,25 @@
|
|||
|
||||
# Version 8.0.4
|
||||
|
||||
|
||||
## Change
|
||||
|
||||
The behavior of AudioTransportSource::hasStreamFinished has been updated to correctly return true when the stream has finished.
|
||||
|
||||
**Possible Issues**
|
||||
|
||||
This change may affect any code that relied on the previous behavior, where the method never returned true.
|
||||
|
||||
**Workaround**
|
||||
|
||||
Review and update any code that depends on hasStreamFinished or any registered ChangeListeners that respond to stream completion.
|
||||
|
||||
**Rationale**
|
||||
|
||||
The previous behavior, where hasStreamFinished never returned true, was incorrect.
|
||||
This update ensures the method works as intended.
|
||||
|
||||
|
||||
## Change
|
||||
|
||||
Support for Arm32 in Projucer has been removed for Windows targets.
|
||||
|
|
|
|||
|
|
@ -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