Accesso rapido:  

Forum: VirtualDJ Plugins

Topic: VDJ 2 sdk

Questo argomento è obsoleto e potrebbe contenere informazioni obsolete o errate.

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
 

Inviato 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!
 

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

Inviato 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
 

Inviato 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
 

Inviato 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!
:)
 

Inviato 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;
}
 

Inviato 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??
 

Inviato Thu 17 Jun 04 @ 8:53 pm
 

Inviato 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
 

Inviato Thu 17 Jun 04 @ 11:37 pm


(Vecchi argomenti e forum sono automaticamente chiusi)