Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: new dsp for using directx audio plugins (Read 20733 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

new dsp for using directx audio plugins

Reply #25
Try setting a breakpoint in CTransformFilter::Receive() in transfrm.cpp as it will in turn call Transform(). Btw, if you "step into" return m_pInputPin->Receive(pSample); in the code below (taken from amfilter.cpp) should you not get into CTransformFilter::Receive() if you built ConvolverFilter with the debug version of BaseClasses?
Code: [Select]
CBaseOutputPin::Deliver(IMediaSample * pSample)
{
   if (m_pInputPin == NULL) {
       return VFW_E_NOT_CONNECTED;
   }


   return m_pInputPin->Receive(pSample);
}


The CDxFilterGraph class is the graph manager class that I use in my code. It's implemented in SDK\DXiClasses\DxFilterGraph.cpp
The doCreateGraph() is the function that inserts the filters into the graph and connect their pins.

new dsp for using directx audio plugins

Reply #26
Well I am still struggling to get to 2nd base.

In class CInitQuit  I had to use the commented out code at the bottom of on_init(), instead of the main code, to get a bit further and get as far as DecideBuffer.  All seemed OK.

I cannot, however, see how CDspDxBridge gets called. In particular, on_chunk never gets called, which may explain why no processing or transformation takes place in my setup.

Perhaps if you could amend your code and add some tracing I could look at it again.

new dsp for using directx audio plugins

Reply #27
Strange that CDspDxBridge::on_chunk() is never called. Is the constructor/destructor ever called? Perhaps the guid is not unique for your system? For me CDspDxBridge::on_chunk() gets called frequently during playback (and only playback).

If you use the commented out code at the bottom of on_init(), the line
Code: [Select]
hr = g_pGraph->SetFilter( pFilter );

should fail if you use ConvolverFilter. This because the properties have not yet been set. That is why I moved that part of the code into CDspDxBridge constructor.

Quote
Perhaps if you could amend your code and add some tracing I could look at it again.

Amend how? I mean it is working for me... What tracing do you want me to add? Sorry if I'm a bit slow so please be more specific.

new dsp for using directx audio plugins

Reply #28
Sorry, I don't have the code here, but I could not see how or where DspDxBridge got constructed.  Tracing suggests that it does not get constructed in my setup, so I never get beyond OnInitQuit, which works OK.

I clearly need to get a tracing handle on the on_chunk stuff if I am to help on the deadlock problem that you have got to.

new dsp for using directx audio plugins

Reply #29
A new instance of CDspDxBridge is created by foobar2000 when playback is started and it is destroyed when playback stop. In the constructor of CDspDxBridge I create an instance of the graph and insert the filter created in on_init() into the graph.

I already fixed the deadlock problem...

new dsp for using directx audio plugins

Reply #30
Good.  Happy to help test when you are ready.

new dsp for using directx audio plugins

Reply #31
Enumerate Directshow plugins?

Since you seem to be using Cakewalk's DXi2SDK, take a look at the example Host which has an example of how to enumerate Directshow DXi synth plugins.  I think it first enumerates Directshow DX plugins then goes through the list and searches for DXi synth plugins.  Anyway look in file PluginInventory.cpp in the Host folder of Cakewalk's DXi2SDK.

What's the licensing for your dxbridge sourcecode? BSD? GPL? Public domain?

new dsp for using directx audio plugins

Reply #32
I guess any license that does not violate Cakewalk's DXi2SDK. However I would appreciate if any bugfixes are reported back to me so I can work them into my own code.

new dsp for using directx audio plugins

Reply #33
I looked at the code in PluginInventory.cpp. It uses the same approach that I already tried, in vain 

new dsp for using directx audio plugins

Reply #34
Quote
I looked at the code in PluginInventory.cpp. It uses the same approach that I already tried, in vain 
[a href="index.php?act=findpost&pid=361493"][{POST_SNAPBACK}][/a]


Hmmm, If you skip the DXi check, it does enumerate all the Directshow filters using EnumMatchingFilters() which includes some stuff like audio compression managers.  Maybe you need to tweak the parameters to match.  Or you need some extra steps to remove stuff from the list that you don't want.  Seems like the question of enumerating DX effects plugins comes up.  Wonder why there is no example in DXi2SDK?

I think I saw another post by you using CLSID_LegacyAmFilterCategory.  I have not tried that.

new dsp for using directx audio plugins

Reply #35
I've tried to tweak the parameters, but I always get to many filters or to few. I've been searching the registry for a "common DX audio folder" where clsid's are stored. But I never found a folder listing iZotope Ozone, ConvolverFilter and Ni GuitarRig Plugin. If I dont find a way to enumerate the correct filters I'll just enumerate every audio filter and then the user have to figure out for himself what filter work or not.

new dsp for using directx audio plugins

Reply #36
Quote
I already fixed the deadlock problem...
[a href="index.php?act=findpost&pid=360175"][{POST_SNAPBACK}][/a]


How did you fix it in the end?

new dsp for using directx audio plugins

Reply #37
The deadlock was caused by me when I added synchronization (critical section) to the code. I just removed the synchronization code and it worked fine.

new dsp for using directx audio plugins

Reply #38
I think I'm close now to finding out how to list "valid" audio filters. I'll post a new plugin when I'm done.

new dsp for using directx audio plugins

Reply #39
How is this wrapper coming on?

new dsp for using directx audio plugins

Reply #40
Sorry for taking such a long time. I've just been too busy lately. I'm moving to a new city and I've been away on job interviews. I'll try to finish it soon.

new dsp for using directx audio plugins

Reply #41
Has there been any movement on this wrapper.  I'm really keen to see it!

new dsp for using directx audio plugins

Reply #42
i'm not using fb2k until this one comes out ..

new dsp for using directx audio plugins

Reply #43
i'm not using fb2k until this one comes out ..

This is good news indeed. Oern, please don't ever publish your plugin

There are millions more vst plugins, vst is the way more common approach. Writing a dxi wrapper only because some izotope stuff is also available as dxi is a waste of human lifetime  Just curious: Why didn't you write a vst wrapper?

new dsp for using directx audio plugins

Reply #44
well looking at this thread this seems to be the place to ask, sorry if it is off topic but i don't have a lot of directshow/directx knowledge.

At some point i was able to get adaptx to show "Convolver DSP plugin" in its list (which is i beleive the DMO), now i can't seem to get it to do this on another pc unless i replace its adaptx.cfg with the other.  its still doesn't list the plugin however, only opens with it in the window.

graph edit shows it under DMO Audio effects.

is there a way to register DMO's or something, is that the reason adaptx isn't seeing it?

thanks guys and sorry for being a bit dumb and off topic!!

new dsp for using directx audio plugins

Reply #45
i'm not using fb2k until this one comes out ..

This is good news indeed. Oern, please don't ever publish your plugin

There are millions more vst plugins, vst is the way more common approach. Writing a dxi wrapper only because some izotope stuff is also available as dxi is a waste of human lifetime  Just curious: Why didn't you write a vst wrapper?



SHHHH =)  we want the wrapper!! =) =) =)

doing good bud, lets code, woohoo rawrr =)

thought that might get you going 

new dsp for using directx audio plugins

Reply #46
Not much action on this...  what happened to our coder?