mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
fix: Fix usage of unitialized functions
This commit is contained in:
parent
daaa5518dd
commit
06ae7ead0c
|
@ -318,16 +318,23 @@ void OpenAL2::doOutput()
|
|||
}
|
||||
|
||||
ALdouble latency[2] = {0};
|
||||
alGetSourcedvSOFT(alProxySource, AL_SEC_OFFSET_LATENCY_SOFT, latency);
|
||||
if (echoCancelSupported) {
|
||||
alGetSourcedvSOFT(alProxySource, AL_SEC_OFFSET_LATENCY_SOFT, latency);
|
||||
}
|
||||
|
||||
checkAlError();
|
||||
|
||||
ALshort outBuf[AUDIO_FRAME_SAMPLE_COUNT_PER_CHANNEL] = {0};
|
||||
alcMakeContextCurrent(alProxyContext);
|
||||
alcRenderSamplesSOFT(alProxyDev, outBuf, AUDIO_FRAME_SAMPLE_COUNT_PER_CHANNEL);
|
||||
checkAlcError(alProxyDev);
|
||||
if (echoCancelSupported) {
|
||||
alcMakeContextCurrent(alProxyContext);
|
||||
alcRenderSamplesSOFT(alProxyDev, outBuf, AUDIO_FRAME_SAMPLE_COUNT_PER_CHANNEL);
|
||||
checkAlcError(alProxyDev);
|
||||
|
||||
alcMakeContextCurrent(alOutContext);
|
||||
}
|
||||
|
||||
alcMakeContextCurrent(alOutContext);
|
||||
alBufferData(bufids[0], AL_FORMAT_MONO16, outBuf, AUDIO_FRAME_SAMPLE_COUNT_PER_CHANNEL * 2, AUDIO_SAMPLE_RATE);
|
||||
|
||||
alSourceQueueBuffers(alProxySource, 1, bufids);
|
||||
|
||||
// initialize echo canceler if supported
|
||||
|
|
Loading…
Reference in New Issue
Block a user