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:
parent
634ca9d70d
commit
31e62cfc5c
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user