Quick Sign In:  

Forum: VirtualDJ Plugins

Topic: VDJ 2 sdk

Dieses Thema ist veraltet und kann veraltete oder falsche Informationen enthalten.

I'm having problems with the new VdjDsp2.h file (???)...

First of all, I create a new project using the wizard available on this website (for Visual Studio 2003). I try to compile it to make sure it works, and I get an error because the function GetSongSamples' 3rd argument has to be of type (short **)...

So I cast (short**)&samples, and I compile. I get a very bad quality sound... Of course I can't use that in my plugins... The same thing happens when I don't cast it and I declare "short *samples;"

I'm using the 'Normal Processing', with 'Default interface' type of project (in the wizard)...

Any help would be greatly appreciated,

macourteau
 

geposted Wed 16 Jun 04 @ 7:36 pm
FruitPRO InfinityMember since 2003
Hello Marcourteau. No solution for you but pleased to see your status ;-)

Keep up the good work!
 

geposted Wed 16 Jun 04 @ 8:17 pm
Thanks... :D
 

geposted Wed 16 Jun 04 @ 9:11 pm
I found a way to make it work by using the "Fixed-width" buffer... Well at least it seems to work without any modification, so it should be ok... But I would still prefer to use the "normal" version, since the fixed-width version is said to be slower (cf. VdjDsp2.h, comment at the bottom)

Anyway... I'll try to convert my plugins to use the fixed-width buffers for as long as I don't find a solution.

macourteau
 

geposted Thu 17 Jun 04 @ 2:04 am
As a matter of fact, it still doesn't work even with a fixed-length buffer (sounds horrible)...

HELP! (lol)

Thanks, macourteau
 

geposted Thu 17 Jun 04 @ 2:59 am
kaleoPRO InfinityMember since 2003
macourteau:

You don't have to change anything compare to your previous codes exept the type of "samples" that must go from "int* samples" to "short *samples"

And call GetSongPos(...,...,&samples);

That's all!
:)
 

geposted Thu 17 Jun 04 @ 5:41 am
hmz... I tried your suggestion, but I get the same results as when I used "(short **)&samples;". Here's my code to retrieve samples:

HRESULT __stdcall CLFO_att_v2::OnComputeNewSamples(int pos,int nb,short *buffer)
{
      // Retreive samples
      short *samples;
      HRESULT res=GetSongSamples(pos,nb,&samples);if(res) return res;
      (...)
      return S_OK;
}
 

geposted Thu 17 Jun 04 @ 1:06 pm
kaleoPRO InfinityMember since 2003
This code is seems to be right...

are you sure your problem come from this??
 

geposted Thu 17 Jun 04 @ 8:53 pm
 

geposted Thu 17 Jun 04 @ 9:00 pm
I found the solution by looking at the Flanger source code... Here's how I fixed it:

int *samples;
int *dst = (int*)buffer;
HRESULT res=GetSongSamples(pos,nb,(short**)&samples);if(res) return res;

when processing, output to "dst" instead of "buffer", and everything should work fine :D

Cheers, macourteau
 

geposted Thu 17 Jun 04 @ 11:37 pm


(Alte Themen und Foren werden automatisch geschlossen)