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:
parent
026517dc5a
commit
aa356bb73a
|
@ -391,7 +391,7 @@ void OpenAL::playAudioBuffer(uint sourceId, const int16_t* data, int samples, un
|
||||||
alSourcei(sourceId, AL_LOOPING, AL_FALSE);
|
alSourcei(sourceId, AL_LOOPING, AL_FALSE);
|
||||||
|
|
||||||
if (processed == 0) {
|
if (processed == 0) {
|
||||||
if (queued >= BUFFER_COUNT) {
|
if (static_cast<ALuint>(queued) >= BUFFER_COUNT) {
|
||||||
// reached limit, drop audio
|
// reached limit, drop audio
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -495,7 +495,7 @@ void OpenAL::doCapture()
|
||||||
|
|
||||||
ALint curSamples = 0;
|
ALint curSamples = 0;
|
||||||
alcGetIntegerv(alInDev, ALC_CAPTURE_SAMPLES, sizeof(curSamples), &curSamples);
|
alcGetIntegerv(alInDev, ALC_CAPTURE_SAMPLES, sizeof(curSamples), &curSamples);
|
||||||
if (curSamples < AUDIO_FRAME_SAMPLE_COUNT)
|
if (static_cast<ALuint>(curSamples) < AUDIO_FRAME_SAMPLE_COUNT)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int16_t buf[AUDIO_FRAME_SAMPLE_COUNT * AUDIO_CHANNELS];
|
int16_t buf[AUDIO_FRAME_SAMPLE_COUNT * AUDIO_CHANNELS];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user