登录:     


Forum: VirtualDJ Plugins

Topic: VDJ 2 sdk

由于该帖子已年深日久,可能包含陈旧过时或描述错误的信息。

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
 

发表时间 Wed 16 Jun 04 @ 7:36 pm
Hello Marcourteau. No solution for you but pleased to see your status ;-)

Keep up the good work!
 

Thanks... :D
 

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
 

As a matter of fact, it still doesn't work even with a fixed-length buffer (sounds horrible)...

HELP! (lol)

Thanks, macourteau
 

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

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

This code is seems to be right...

are you sure your problem come from this??
 

 

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
 



(陈旧帖子或论坛版块会自动关闭)