From e1266685d947b1b2ea07a6390e142ab6f150d0df Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Mon, 8 May 2017 10:29:02 +0300 Subject: [PATCH] Use proper function to set sound offsets in samples This fixes the following compilation warnings: src\sound\oalsound.cpp(1588): warning C4244: 'argument': conversion from 'unsigned int' to 'ALfloat', possible loss of data src\sound\oalsound.cpp(1796): warning C4244: 'argument': conversion from 'unsigned int' to 'ALfloat', possible loss of data --- src/sound/oalsound.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sound/oalsound.cpp b/src/sound/oalsound.cpp index f323f858a..77068cf96 100644 --- a/src/sound/oalsound.cpp +++ b/src/sound/oalsound.cpp @@ -1585,7 +1585,7 @@ FISoundChannel *OpenALSoundRenderer::StartSound(SoundHandle sfx, float vol, int else { if((chanflags&SNDF_ABSTIME)) - alSourcef(source, AL_SAMPLE_OFFSET, reuse_chan->StartTime.Lo); + alSourcei(source, AL_SAMPLE_OFFSET, reuse_chan->StartTime.Lo); else { float offset = std::chrono::duration_cast>( @@ -1793,7 +1793,7 @@ FISoundChannel *OpenALSoundRenderer::StartSound3D(SoundHandle sfx, SoundListener else { if((chanflags&SNDF_ABSTIME)) - alSourcef(source, AL_SAMPLE_OFFSET, reuse_chan->StartTime.Lo); + alSourcei(source, AL_SAMPLE_OFFSET, reuse_chan->StartTime.Lo); else { float offset = std::chrono::duration_cast>(