Hi all,
sorry for the inconvenience. I do not actively develop this extension any more.
But I noticed that this issue is caused by my bugfix I introduced to fix an issue with this DSP called in a different thread than the main thread.
My solution I can offer to you is to revert to the old behavior which did not have this fix incorporated.
Then you can not call this DSP from context menu "View" > "DSP" > "Dynamic DSP". This will lead to a crash because of running in a different thread.
Instead you can only use this DSP inside the preference dialog of foobar2000. But here at least the DSP is fully functional again.
I created a version 2.1.1 of this DSP with all the new features but the main thread fix reverted to the old version:
https://hydrogenaud.io/index.php?topic=108904.msg988324#msg988324
This should work for foobar2000 1.6 with the limitation described above.
If anyone knows a better way to fix this, feel free to update the addon.
For those who are interested, my solution to fix the threading issue looked like the following:
class CMyDSPPopup : public CDialogImpl < CMyDSPPopup > {
[...]
void OnConfigureDSP(UINT itemNum, int id, CWindow wnd) {
int selectedItem = chainsList.GetCurSel();
if (selectedItem != LB_ERR) {
WCHAR str[MAX_PRESENT_NAME_LEN];
chainsList.GetText(selectedItem, str);
pfc::string8 name = ConvertWchar(str);
// Call dsp configuration popup in main thread
m_mthelper.add(this, name);
}
}
callInMainThreadHelper m_mthelper;
public:
void inMainThread(const pfc::string8& chainName) {
dsp_chain_config_impl *chain = chainsMap[chainName];
// Set this->m_hWnd as parent, otherwise the user will be able to close this window
// but leave the DSP popup open => crash
static_api_ptr_t<dsp_config_manager>().get_ptr()->configure_popup(*chain, this->m_hWnd, chainName.toString());
}
friend class callInMainThread;
Now I just reverted it to:
void OnConfigureDSP(UINT itemNum, int id, CWindow wnd) {
int selectedItem = chainsList.GetCurSel();
if (selectedItem != LB_ERR) {
WCHAR str[MAX_PRESENT_NAME_LEN];
chainsList.GetText(selectedItem, str);
pfc::string8 name = ConvertWchar(str);
// Call dsp configuration in current thread (bugfix for fb 1.6)
dsp_chain_config_impl *chain = chainsMap[ConvertWchar(str)];
static_api_ptr_t<dsp_config_manager>().get_ptr()->configure_popup(*chain, NULL, name.toString());
}
}
I have no clue why the fist version suddenly stopped working.