From d042c2f3460ab3cd7d5c55a8ad5b1819ec5e6813 Mon Sep 17 00:00:00 2001 From: "Tux3 / Mlkj / !Lev.uXFMLA" Date: Sun, 4 Jan 2015 02:04:07 +0100 Subject: [PATCH] Filter incoming audio, not sent audio --- src/coreav.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/coreav.cpp b/src/coreav.cpp index 5fb12e128..cc7ded090 100644 --- a/src/coreav.cpp +++ b/src/coreav.cpp @@ -226,6 +226,11 @@ void Core::playCallAudio(void* toxav, int32_t callId, const int16_t *data, uint1 if (!calls[callId].alSource) alGenSources(1, &calls[callId].alSource); +#ifdef QTOX_FILTER_AUDIO + if (filterer[callId]) + filterer[callId]->filterAudio((int16_t*) data, samples); +#endif + ToxAvCSettings dest; if (toxav_get_peer_csettings((ToxAv*)toxav, callId, 0, &dest) == 0) playAudioBuffer(calls[callId].alSource, data, samples, dest.audio_channels, dest.audio_sample_rate); @@ -266,12 +271,6 @@ void Core::sendCallAudio(int callId, ToxAv* toxav) return; } -#ifdef QTOX_FILTER_AUDIO - if (filterer[callId]) - { - filterer[callId]->filterAudio((int16_t*) buf, framesize); - } -#endif if ((r = toxav_send_audio(toxav, callId, dest, r)) < 0) { qDebug() << "Core: toxav_send_audio error";