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
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
Mensajes Wed 16 Jun 04 @ 7:36 pm
Hello Marcourteau. No solution for you but pleased to see your status ;-)
Keep up the good work!
Keep up the good work!
Mensajes Wed 16 Jun 04 @ 8:17 pm
Thanks... :D
Mensajes 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
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
Mensajes 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
HELP! (lol)
Thanks, macourteau
Mensajes Thu 17 Jun 04 @ 2:59 am
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!
:)
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!
:)
Mensajes 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;
}
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;
}
Mensajes Thu 17 Jun 04 @ 1:06 pm
This code is seems to be right...
are you sure your problem come from this??
are you sure your problem come from this??
Mensajes Thu 17 Jun 04 @ 8:53 pm
I'm pretty sure the problem's there... I haven't done any modification to the rest of the code, and this gives a jumpy/weird/ugly sound... Anyway here's the code:
http://macourteau.is-a-geek.net:81/vdj/test.cpp
macourteau
http://macourteau.is-a-geek.net:81/vdj/test.cpp
macourteau
Mensajes 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
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
Mensajes Thu 17 Jun 04 @ 11:37 pm