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

Major bug: audio filtering never actually worked

We filtered the audio after it was already processed by core, i.e. it was never used
@mwuttke97 @tux3 @Dubslow pls
This commit is contained in:
Dubslow 2015-02-17 23:20:31 -06:00
parent 15dcff6d2d
commit 1c3bcd000c
No known key found for this signature in database
GPG Key ID: 3DB8E05315C220AA

View File

@ -256,6 +256,11 @@ void Core::sendCallAudio(int callId, ToxAv* toxav)
if (Audio::tryCaptureSamples(buf, framesize))
{
#ifdef QTOX_FILTER_AUDIO
if (filterer[callId])
filterer[callId]->filterAudio((int16_t*) buf, framesize);
#endif
uint8_t dest[bufsize];
int r;
if ((r = toxav_prepare_audio_frame(toxav, callId, dest, framesize*2, (int16_t*)buf, framesize)) < 0)
@ -265,11 +270,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";