Skip to content

Commit

Permalink
Merge pull request #659 from drowe67/ms-filter-fix-2
Browse files Browse the repository at this point in the history
ACTUALLY fix the crash supposedly fixed by 1.9.7.1.
  • Loading branch information
tmiw authored Jan 19, 2024
2 parents c451ee9 + 74145b7 commit 780719b
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 58 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
5 changes: 5 additions & 0 deletions USER_MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 #659)

## V1.9.7.1 January 2024

1. Bugfixes:
Expand Down
97 changes: 43 additions & 54 deletions src/eq.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}


4 changes: 1 addition & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 780719b

Please sign in to comment.