mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 13:11:33 +00:00
- fixed a few warnings in OpenAL code.
This commit is contained in:
parent
cd8213f067
commit
ebca170e73
1 changed files with 3 additions and 3 deletions
|
@ -1188,7 +1188,7 @@ std::pair<SoundHandle,bool> OpenALSoundRenderer::LoadSound(BYTE *sfxdata, int le
|
|||
int sum = 0;
|
||||
for(size_t c = 0;c < chancount;c++)
|
||||
sum += sfxdata[i*chancount + c];
|
||||
sfxdata[i] = sum / chancount;
|
||||
sfxdata[i] = short(sum / chancount);
|
||||
}
|
||||
}
|
||||
else if(type == SampleType_UInt8)
|
||||
|
@ -1199,10 +1199,10 @@ std::pair<SoundHandle,bool> OpenALSoundRenderer::LoadSound(BYTE *sfxdata, int le
|
|||
int sum = 0;
|
||||
for(size_t c = 0;c < chancount;c++)
|
||||
sum += sfxdata[i*chancount + c] - 128;
|
||||
sfxdata[i] = (sum / chancount) + 128;
|
||||
sfxdata[i] = BYTE((sum / chancount) + 128);
|
||||
}
|
||||
}
|
||||
data.Resize(data.Size()/chancount);
|
||||
data.Resize(unsigned(data.Size()/chancount));
|
||||
}
|
||||
|
||||
ALenum err;
|
||||
|
|
Loading…
Reference in a new issue