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

Fix loopback capture audio code

This commit is contained in:
tux3 2015-12-10 22:01:49 +01:00
parent 634ca9d70d
commit 31e62cfc5c
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -586,11 +586,11 @@ void Audio::getEchoesToFilter(AudioFilterer* filterer, int framesize)
{
#ifdef ALC_LOOPBACK_CAPTURE_SAMPLES
ALint samples;
alcGetIntegerv(Audio::alOutDev, ALC_LOOPBACK_CAPTURE_SAMPLES, sizeof(samples), &samples);
alcGetIntegerv(Audio::getInstance().alOutDev, ALC_LOOPBACK_CAPTURE_SAMPLES, sizeof(samples), &samples);
if (samples >= framesize)
{
int16_t buf[framesize];
alcCaptureSamplesLoopback(Audio::alOutDev, buf, framesize);
alcCaptureSamplesLoopback(Audio::getInstance().alOutDev, buf, framesize);
filterer->passAudioOutput(buf, framesize);
filterer->setEchoDelayMs(5); // This 5ms is configurable I believe
}