From aa356bb73a7443720a0d73be1f5401940f014498 Mon Sep 17 00:00:00 2001 From: Diadlo Date: Tue, 9 May 2017 00:18:14 +0300 Subject: [PATCH] fix(audio): Fix signed and unsigned comparation --- src/audio/backend/openal.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/audio/backend/openal.cpp b/src/audio/backend/openal.cpp index 467e8acf5..b3d892f7d 100644 --- a/src/audio/backend/openal.cpp +++ b/src/audio/backend/openal.cpp @@ -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(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(curSamples) < AUDIO_FRAME_SAMPLE_COUNT) return; int16_t buf[AUDIO_FRAME_SAMPLE_COUNT * AUDIO_CHANNELS];