From ba176af5cd45fb7f563085253090db8337c6aca7 Mon Sep 17 00:00:00 2001 From: Lynix Date: Sun, 17 Apr 2016 18:08:37 +0200 Subject: [PATCH] Audio/SoundBuffer: Fix duration of large sound files Former-commit-id: be1c5ba7c9960331eeb359d6cbfa714aeb84f479 --- src/Nazara/Audio/SoundBuffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Nazara/Audio/SoundBuffer.cpp b/src/Nazara/Audio/SoundBuffer.cpp index 10edc74f8..c01878383 100644 --- a/src/Nazara/Audio/SoundBuffer.cpp +++ b/src/Nazara/Audio/SoundBuffer.cpp @@ -105,7 +105,7 @@ namespace Nz m_impl = new SoundBufferImpl; m_impl->buffer = buffer; - m_impl->duration = (1000*sampleCount / (format * sampleRate)); + m_impl->duration = static_cast((1000ULL*sampleCount / (format * sampleRate))); m_impl->format = format; m_impl->sampleCount = sampleCount; m_impl->sampleRate = sampleRate;