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
This commit is contained in:
alexey.lysiuk 2017-05-08 10:29:02 +03:00
parent e848abf4df
commit e1266685d9
1 changed files with 2 additions and 2 deletions

View File

@ -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<std::chrono::duration<float>>(
@ -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<std::chrono::duration<float>>(