For plugins using OnProcessSamples, I have no problem.
But for plugins using OnGetSongBuffer, they work well when compiled on Debug mode, but not at all when compiled on Release mode.
Any idea ?
But for plugins using OnGetSongBuffer, they work well when compiled on Debug mode, but not at all when compiled on Release mode.
Any idea ?
发表时间 Sat 10 Oct 20 @ 11:13 am
Something in your project file that is not well customized. Have you checked as last time?
I think i still have the one that you sent me.
I think i still have the one that you sent me.
发表时间 Sat 10 Oct 20 @ 8:15 pm
Yes I did. (In propriety, .exe changed as .dll).
发表时间 Sun 11 Oct 20 @ 10:20 am
I can compile the code in dll file in release mode. But when I tested the addons, there is no more sound.
Same code in dll file in debug mode works very well with vdj.
Same code in dll file in debug mode works very well with vdj.
发表时间 Sun 11 Oct 20 @ 10:57 am
Even in Release mode you can run the plugin using the Visual Studio debugger to check if OnGetSongBuffer is actually called, and if so what values it gets.
Most likely some configuration difference though.
Most likely some configuration difference though.
发表时间 Sun 11 Oct 20 @ 12:47 pm
I identified the issue.
The plugin works if the program returns the buffer of GetSongBuffer(pos, nb, (short**)&bufferShortIn);
But if I return a different buffer, it doesn't work.
But I can't keep the buffer of GetSongBuffer because it modifies the original sound (as discussed in an other topic).
The plugin works if the program returns the buffer of GetSongBuffer(pos, nb, (short**)&bufferShortIn);
But if I return a different buffer, it doesn't work.
But I can't keep the buffer of GetSongBuffer because it modifies the original sound (as discussed in an other topic).
发表时间 Thu 15 Oct 20 @ 8:23 pm
I am not sure to understand. Are you sure that you return a buffer of the same size (nb)?
发表时间 Thu 15 Oct 20 @ 11:46 pm
And make sure the buffer you return is a member of your plugin class, not a local buffer within the ongetsongbuffer function
发表时间 Fri 16 Oct 20 @ 4:33 am
@DJCEL yes it is exactly the same lenght.
I use a vector sized according to the number "nb" just before the loop "for (int i = 0; i < nb; i++)"
if (bufferShortOut.size() != nb * 2) { bufferShortOut.resize(nb * 2); }
I imagine you impressed that I use the vectors. Me too :-)
But Adion gave me the idea.
@Adion : yes I declare "std::vector<short> bufferShortOut;" in the header file, otherwise the vector doesn't work.
I use a vector sized according to the number "nb" just before the loop "for (int i = 0; i < nb; i++)"
if (bufferShortOut.size() != nb * 2) { bufferShortOut.resize(nb * 2); }
I imagine you impressed that I use the vectors. Me too :-)
But Adion gave me the idea.
@Adion : yes I declare "std::vector<short> bufferShortOut;" in the header file, otherwise the vector doesn't work.
发表时间 Fri 16 Oct 20 @ 6:34 am
no reason to resize everytime ^^
if (bufferShortOut.size() < nb) is far enough, there is enough as long as there is memory allocated
Because when vector resizes it can remap data in memory this can be an issue depending on how you use it as a buffer
used as a vector no problem (but not friendly), as a pointer to data there is a potential issue if declaration was too early
so make sure you are using and returning current bufferTemp.data(), not a previously allocated one
debug will keep it available, release will mainly recycle it quickly
if (bufferShortOut.size() < nb) is far enough, there is enough as long as there is memory allocated
Because when vector resizes it can remap data in memory this can be an issue depending on how you use it as a buffer
used as a vector no problem (but not friendly), as a pointer to data there is a potential issue if declaration was too early
so make sure you are using and returning current bufferTemp.data(), not a previously allocated one
debug will keep it available, release will mainly recycle it quickly
发表时间 Fri 16 Oct 20 @ 8:03 am
Seeing that you are uploading a lot of plugins, did you manage to find the issue? I hope the plugins you are uploading are not all Debug builds?
发表时间 Thu 22 Oct 20 @ 7:24 am
No worries, all my plugins are all release builds ;-)
发表时间 Sun 25 Oct 20 @ 4:42 pm