From a261be352a6f7c83f50106f26d20435e835b6a2f Mon Sep 17 00:00:00 2001 From: Mooneer Salem Date: Thu, 18 Jan 2024 19:58:30 -0800 Subject: [PATCH 1/4] Second attempt at fixing the filter functionality. --- src/eq.cpp | 97 +++++++++++++++++++++++----------------------------- src/main.cpp | 4 +-- 2 files changed, 44 insertions(+), 57 deletions(-) diff --git a/src/eq.cpp b/src/eq.cpp index 62c6db144..00f2c3d81 100644 --- a/src/eq.cpp +++ b/src/eq.cpp @@ -58,8 +58,6 @@ void *MainFrame::designAnEQFilter(const char filterType[], float freqHz, float g void MainFrame::designEQFilters(paCallBackData *cb, int rxSampleRate, int txSampleRate) { - deleteEQFilters(cb); - // init Mic In Equaliser Filters if (cb->micInEQEnable) { assert(cb->sbqMicInBass == nullptr && cb->sbqMicInTreble == nullptr && cb->sbqMicInMid == nullptr); @@ -87,66 +85,57 @@ void MainFrame::designEQFilters(paCallBackData *cb, int rxSampleRate, int txSam // Note: vol can be a no-op! assert(cb->sbqSpkOutBass != nullptr && cb->sbqSpkOutTreble != nullptr && cb->sbqSpkOutMid != nullptr); } - - m_newMicInFilter = false; - m_newSpkOutFilter = false; } void MainFrame::deleteEQFilters(paCallBackData *cb) { - if (m_newMicInFilter) + if (cb->sbqMicInBass != nullptr) { - if (cb->sbqMicInBass != nullptr) - { - sox_biquad_destroy(cb->sbqMicInBass); - } - cb->sbqMicInBass = nullptr; - - if (cb->sbqMicInTreble != nullptr) - { - sox_biquad_destroy(cb->sbqMicInTreble); - } - cb->sbqMicInTreble = nullptr; - - if (cb->sbqMicInMid != nullptr) - { - sox_biquad_destroy(cb->sbqMicInMid); - } - cb->sbqMicInMid = nullptr; - - if (cb->sbqMicInVol != nullptr) - { - sox_biquad_destroy(cb->sbqMicInVol); - } - cb->sbqMicInVol = nullptr; + sox_biquad_destroy(cb->sbqMicInBass); } + cb->sbqMicInBass = nullptr; - if (m_newSpkOutFilter) - { - if (cb->sbqSpkOutBass != nullptr) - { - sox_biquad_destroy(cb->sbqSpkOutBass); - } - cb->sbqSpkOutBass = nullptr; - - if (cb->sbqSpkOutTreble != nullptr) - { - sox_biquad_destroy(cb->sbqSpkOutTreble); - } - cb->sbqSpkOutTreble = nullptr; - - if (cb->sbqSpkOutMid != nullptr) - { - sox_biquad_destroy(cb->sbqSpkOutMid); - } - cb->sbqSpkOutMid = nullptr; - - if (cb->sbqSpkOutVol != nullptr) - { - sox_biquad_destroy(cb->sbqSpkOutVol); - } - cb->sbqSpkOutVol = nullptr; + if (cb->sbqMicInTreble != nullptr) + { + sox_biquad_destroy(cb->sbqMicInTreble); + } + cb->sbqMicInTreble = nullptr; + + if (cb->sbqMicInMid != nullptr) + { + sox_biquad_destroy(cb->sbqMicInMid); + } + cb->sbqMicInMid = nullptr; + + if (cb->sbqMicInVol != nullptr) + { + sox_biquad_destroy(cb->sbqMicInVol); + } + cb->sbqMicInVol = nullptr; + + if (cb->sbqSpkOutBass != nullptr) + { + sox_biquad_destroy(cb->sbqSpkOutBass); + } + cb->sbqSpkOutBass = nullptr; + + if (cb->sbqSpkOutTreble != nullptr) + { + sox_biquad_destroy(cb->sbqSpkOutTreble); + } + cb->sbqSpkOutTreble = nullptr; + + if (cb->sbqSpkOutMid != nullptr) + { + sox_biquad_destroy(cb->sbqSpkOutMid); + } + cb->sbqSpkOutMid = nullptr; + + if (cb->sbqSpkOutVol != nullptr) + { + sox_biquad_destroy(cb->sbqSpkOutVol); } + cb->sbqSpkOutVol = nullptr; } diff --git a/src/main.cpp b/src/main.cpp index 9e88d9aff..a00bfeddd 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1512,9 +1512,7 @@ void MainFrame::OnTimer(wxTimerEvent &evt) g_rxUserdata->micInEQEnable = wxGetApp().appConfiguration.filterConfiguration.micInChannel.eqEnable; g_rxUserdata->spkOutEQEnable = wxGetApp().appConfiguration.filterConfiguration.spkOutChannel.eqEnable; - if ( - wxGetApp().appConfiguration.filterConfiguration.micInChannel.eqEnable || - wxGetApp().appConfiguration.filterConfiguration.spkOutChannel.eqEnable) + if (m_newMicInFilter || m_newSpkOutFilter) { if (g_nSoundCards == 1) { From 3733ba7f94a6a91eee10f79e006c7ce96626b19d Mon Sep 17 00:00:00 2001 From: Mooneer Salem Date: Thu, 18 Jan 2024 20:00:18 -0800 Subject: [PATCH 2/4] Increment version to 1.9.7.2 *sigh* --- CMakeLists.txt | 4 ++-- USER_MANUAL.md | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cdbd4fc28..b30515da9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ endif() set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11" CACHE STRING "Minimum OS X deployment version") set(PROJECT_NAME FreeDV) -set(PROJECT_VERSION 1.9.7.1) +set(PROJECT_VERSION 1.9.7.2) set(PROJECT_DESCRIPTION "HF Digital Voice for Radio Amateurs") set(PROJECT_HOMEPAGE_URL "https://freedv.org") @@ -48,7 +48,7 @@ endif(APPLE) # Adds a tag to the end of the version string. Leave empty # for official release builds. -set(FREEDV_VERSION_TAG "") +set(FREEDV_VERSION_TAG "devel") # Prevent in-source builds to protect automake/autoconf config. # If an in-source build is attempted, you will still need to clean up a few diff --git a/USER_MANUAL.md b/USER_MANUAL.md index e506d4a97..db9d59be7 100644 --- a/USER_MANUAL.md +++ b/USER_MANUAL.md @@ -889,6 +889,11 @@ LDPC | Low Density Parity Check Codes - a family of powerful FEC codes # Release Notes +## V1.9.7.2 January 2024 + +1. Bugfixes: + * Another attempt at fixing the crash previously thought to have been fixed by 1.9.7.1. (PR #657) + ## V1.9.7.1 January 2024 1. Bugfixes: From 014265a290148d07a411c23a4dfa10c4b1376c95 Mon Sep 17 00:00:00 2001 From: Mooneer Salem Date: Thu, 18 Jan 2024 20:01:42 -0800 Subject: [PATCH 3/4] Fix PR# in changelog. --- USER_MANUAL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/USER_MANUAL.md b/USER_MANUAL.md index db9d59be7..f69219865 100644 --- a/USER_MANUAL.md +++ b/USER_MANUAL.md @@ -892,7 +892,7 @@ LDPC | Low Density Parity Check Codes - a family of powerful FEC codes ## V1.9.7.2 January 2024 1. Bugfixes: - * Another attempt at fixing the crash previously thought to have been fixed by 1.9.7.1. (PR #657) + * Another attempt at fixing the crash previously thought to have been fixed by 1.9.7.1. (PR #659) ## V1.9.7.1 January 2024 From 74145b743e51dad47b0187f8216ebb85631a3e49 Mon Sep 17 00:00:00 2001 From: Mooneer Salem Date: Fri, 19 Jan 2024 09:22:48 -0800 Subject: [PATCH 4/4] Remove devel tag from build. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b30515da9..909493e2e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,7 +48,7 @@ endif(APPLE) # Adds a tag to the end of the version string. Leave empty # for official release builds. -set(FREEDV_VERSION_TAG "devel") +set(FREEDV_VERSION_TAG "") # Prevent in-source builds to protect automake/autoconf config. # If an in-source build is attempted, you will still need to clean up a few