mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Fix poor setPlayingOffset
precision (missing float
conversion)
This commit is contained in:
parent
66ecf34356
commit
16e9ae131d
@ -158,7 +158,7 @@ struct SoundStream::Impl : priv::MiniaudioUtils::SoundBase
|
|||||||
|
|
||||||
if (impl.sampleRate != 0)
|
if (impl.sampleRate != 0)
|
||||||
{
|
{
|
||||||
owner->onSeek(seconds(static_cast<float>(frameIndex / impl.sampleRate)));
|
owner->onSeek(seconds(static_cast<float>(frameIndex) / static_cast<float>(impl.sampleRate)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -360,7 +360,7 @@ void SoundStream::setPlayingOffset(Time timeOffset)
|
|||||||
m_impl->sampleBufferCursor = 0;
|
m_impl->sampleBufferCursor = 0;
|
||||||
m_impl->samplesProcessed = frameIndex * m_impl->channelCount;
|
m_impl->samplesProcessed = frameIndex * m_impl->channelCount;
|
||||||
|
|
||||||
onSeek(seconds(static_cast<float>(frameIndex / m_impl->sampleRate)));
|
onSeek(seconds(static_cast<float>(frameIndex) / static_cast<float>(m_impl->sampleRate)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user