Skip to content
Snippets Groups Projects
Commit b2f1910f authored by Alexandre Savard's avatar Alexandre Savard
Browse files

#5855: Fix echo suppression activation/deactivation

parent dac50fad
Branches
Tags
No related merge requests found
...@@ -1055,7 +1055,7 @@ GtkWidget* create_audio_configuration() ...@@ -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); 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")); enableEchoCancel = gtk_check_button_new_with_mnemonic(_("_Echo Cancellation"));
// state = dbus_get_echo_cancel_state(); state = dbus_get_echo_cancel_state();
echoCancelActive = FALSE; echoCancelActive = FALSE;
if (strcmp(state, "enabled") == 0) { if (strcmp(state, "enabled") == 0) {
echoCancelActive = TRUE; echoCancelActive = TRUE;
......
...@@ -300,7 +300,7 @@ int AudioRtpRecordHandler::processDataEncode (void) ...@@ -300,7 +300,7 @@ int AudioRtpRecordHandler::processDataEncode (void)
} }
// echoCanceller.process(micDataConverted, micDataEchoCancelled, nbSample * sizeof(SFLDataFormat)); // echoCanceller.process(micDataConverted, micDataEchoCancelled, nbSample * sizeof(SFLDataFormat));
if(Manager::instance().getEchoCancelState() != "enabled") { if(Manager::instance().getEchoCancelState() == "enabled") {
echoCanceller.getData(micData); echoCanceller.getData(micData);
} }
...@@ -324,7 +324,7 @@ int AudioRtpRecordHandler::processDataEncode (void) ...@@ -324,7 +324,7 @@ int AudioRtpRecordHandler::processDataEncode (void)
// echoCanceller.process(micData, micDataEchoCancelled, nbSample * sizeof(SFLDataFormat)); // echoCanceller.process(micData, micDataEchoCancelled, nbSample * sizeof(SFLDataFormat));
// 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"); _debug("EchoCancel: -------------------------- getData");
echoCanceller.getData(micData); echoCanceller.getData(micData);
} }
...@@ -377,7 +377,7 @@ void AudioRtpRecordHandler::processDataDecode (unsigned char *spkrData, unsigned ...@@ -377,7 +377,7 @@ void AudioRtpRecordHandler::processDataDecode (unsigned char *spkrData, unsigned
nbSample = _audioRtpRecord._converter->upsampleData (spkrDataDecoded, spkrDataConverted, codecSampleRate, mainBufferSampleRate, nbSampleDown); 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)); echoCanceller.putData(spkrDataConverted, nbSample * sizeof(SFLDataFormat));
} }
...@@ -386,7 +386,7 @@ void AudioRtpRecordHandler::processDataDecode (unsigned char *spkrData, unsigned ...@@ -386,7 +386,7 @@ void AudioRtpRecordHandler::processDataDecode (unsigned char *spkrData, unsigned
} else { } else {
if(Manager::instance().getEchoCancelState() != "enabled") { if(Manager::instance().getEchoCancelState() == "enabled") {
_debug("EchoCancel: ------------------------ Put Data"); _debug("EchoCancel: ------------------------ Put Data");
echoCanceller.putData(spkrDataDecoded, expandedSize); echoCanceller.putData(spkrDataDecoded, expandedSize);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment