Skip to main content

Notice

If you are using a Hotmail or Outlook email address, please change it now, as Microsoft is rejecting all email from our service outright.
Topic: Release: Dynamic DSP: gives custom effect chains for individual tracks (Read 28298 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Release: Dynamic DSP: gives custom effect chains for individual tracks

Reply #50
It seems that version by @Mario66  is incompatible with fb2k 1.6.  It is not possible to open configuration window for DSPs inside of chain.


Re: Release: Dynamic DSP: gives custom effect chains for individual tracks

Reply #52
Interesting ... I think someone used this name before. See here https://hydrogenaud.io/index.php?topic=108904.0

wouldn't foo_dsp_dynamic be a more conventional name? I don't think it's taken.
Quis custodiet ipsos custodes?  ;~)

Re: Release: Dynamic DSP: gives custom effect chains for individual tracks

Reply #53
SOURCE


Re: Release: Dynamic DSP: gives custom effect chains for individual tracks

Reply #55
OK. It seems someone wanted to be helpful, but was too lazy to explain what he has done.

In this thread we have version 1 of Dynamic DSP posted in response to non working report.
In the following thread:
https://hydrogenaud.io/index.php?topic=108904.0  there is version 2.1 of Dynamic DSP component, which seems to be latest / nave the highest version number. And is not working as it should in foobar 1.6.

So which one is really the latest? Which one is supposed to work in foobar 1.6? What was the purpose of giving sources of the component?

Re: Release: Dynamic DSP: gives custom effect chains for individual tracks

Reply #56
OK. It seems someone wanted to be helpful, but was too lazy to explain what he has done.
In this thread we have version 1 of Dynamic DSP posted in response to non working report.What was the purpose of giving sources of the component?
It seems that version by @Mario66  is incompatible with fb2k 1.6.  It is not possible to open configuration window for DSPs inside of chain.


Maybe someone of developers help us and create compatible verse for F2K v1.6.

Re: Release: Dynamic DSP: gives custom effect chains for individual tracks

Reply #57
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:
Code: [Select]
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:
Code: [Select]
 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.

 

Re: Release: Dynamic DSP: gives custom effect chains for individual tracks

Reply #58
@Peter - maybe you will be able to judge or check if this is some plugin developer's mistake or is it some bug/regression in newest foobar or its API?

 
SimplePortal 1.0.0 RC1 © 2008-2020