Commit b2f1910f authored by Alexandre Savard's avatar Alexandre Savard

#5855: Fix echo suppression activation/deactivation

parent dac50fad
......@@ -1055,7 +1055,7 @@ GtkWidget* create_audio_configuration()
gtk_table_attach (GTK_TABLE (table), enableNoiseReduction, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
enableEchoCancel = gtk_check_button_new_with_mnemonic(_("_Echo Cancellation"));
// state = dbus_get_echo_cancel_state();
state = dbus_get_echo_cancel_state();
echoCancelActive = FALSE;
if (strcmp(state, "enabled") == 0) {
echoCancelActive = TRUE;
......
......@@ -300,7 +300,7 @@ int AudioRtpRecordHandler::processDataEncode (void)
}
// echoCanceller.process(micDataConverted, micDataEchoCancelled, nbSample * sizeof(SFLDataFormat));
if(Manager::instance().getEchoCancelState() != "enabled") {
if(Manager::instance().getEchoCancelState() == "enabled") {
echoCanceller.getData(micData);
}
......@@ -324,7 +324,7 @@ int AudioRtpRecordHandler::processDataEncode (void)
// echoCanceller.process(micData, micDataEchoCancelled, nbSample * sizeof(SFLDataFormat));
// echoCanceller.process(micData, micDataEchoCancelled, nbSample * sizeof(SFLDataFormat));
if(Manager::instance().getEchoCancelState() != "enabled") {
if(Manager::instance().getEchoCancelState() == "enabled") {
_debug("EchoCancel: -------------------------- getData");
echoCanceller.getData(micData);
}
......@@ -377,7 +377,7 @@ void AudioRtpRecordHandler::processDataDecode (unsigned char *spkrData, unsigned
nbSample = _audioRtpRecord._converter->upsampleData (spkrDataDecoded, spkrDataConverted, codecSampleRate, mainBufferSampleRate, nbSampleDown);
if(Manager::instance().getEchoCancelState() != "enabled") {
if(Manager::instance().getEchoCancelState() == "enabled") {
echoCanceller.putData(spkrDataConverted, nbSample * sizeof(SFLDataFormat));
}
......@@ -386,7 +386,7 @@ void AudioRtpRecordHandler::processDataDecode (unsigned char *spkrData, unsigned
} else {
if(Manager::instance().getEchoCancelState() != "enabled") {
if(Manager::instance().getEchoCancelState() == "enabled") {
_debug("EchoCancel: ------------------------ Put Data");
echoCanceller.putData(spkrDataDecoded, expandedSize);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment