diff --git a/src/SFML/Audio/SoundStream.cpp b/src/SFML/Audio/SoundStream.cpp index 47115e23e..557c0a5d8 100644 --- a/src/SFML/Audio/SoundStream.cpp +++ b/src/SFML/Audio/SoundStream.cpp @@ -158,7 +158,7 @@ struct SoundStream::Impl : priv::MiniaudioUtils::SoundBase if (impl.sampleRate != 0) { - owner->onSeek(seconds(static_cast(frameIndex / impl.sampleRate))); + owner->onSeek(seconds(static_cast(frameIndex) / static_cast(impl.sampleRate))); } else { @@ -360,7 +360,7 @@ void SoundStream::setPlayingOffset(Time timeOffset) m_impl->sampleBufferCursor = 0; m_impl->samplesProcessed = frameIndex * m_impl->channelCount; - onSeek(seconds(static_cast(frameIndex / m_impl->sampleRate))); + onSeek(seconds(static_cast(frameIndex) / static_cast(m_impl->sampleRate))); }