1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix(audio): Fix signed and unsigned comparation

This commit is contained in:
Diadlo 2017-05-09 00:18:14 +03:00
parent 026517dc5a
commit aa356bb73a
No known key found for this signature in database
GPG Key ID: 5AF9F2E29107C727

View File

@ -391,7 +391,7 @@ void OpenAL::playAudioBuffer(uint sourceId, const int16_t* data, int samples, un
alSourcei(sourceId, AL_LOOPING, AL_FALSE);
if (processed == 0) {
if (queued >= BUFFER_COUNT) {
if (static_cast<ALuint>(queued) >= BUFFER_COUNT) {
// reached limit, drop audio
return;
}
@ -495,7 +495,7 @@ void OpenAL::doCapture()
ALint curSamples = 0;
alcGetIntegerv(alInDev, ALC_CAPTURE_SAMPLES, sizeof(curSamples), &curSamples);
if (curSamples < AUDIO_FRAME_SAMPLE_COUNT)
if (static_cast<ALuint>(curSamples) < AUDIO_FRAME_SAMPLE_COUNT)
return;
int16_t buf[AUDIO_FRAME_SAMPLE_COUNT * AUDIO_CHANNELS];