Ingreso rápido:  

Forum: VirtualDJ Plugins

Tema: Debug/Release

Este tópico es antiguo y puede contener información incorrecta para la nueva versión.

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 ?

 

Mensajes Sat 10 Oct 20 @ 11:13 am
djcelPRO InfinityModeratorMember since 2004
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.
 

Mensajes Sat 10 Oct 20 @ 8:15 pm
Yes I did. (In propriety, .exe changed as .dll).

 

Mensajes 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.
 

Mensajes Sun 11 Oct 20 @ 10:57 am
AdionPRO InfinityCTOMember since 2006
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.
 

Mensajes 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).
 

Mensajes Thu 15 Oct 20 @ 8:23 pm
djcelPRO InfinityModeratorMember since 2004
I am not sure to understand. Are you sure that you return a buffer of the same size (nb)?
 

Mensajes Thu 15 Oct 20 @ 11:46 pm
AdionPRO InfinityCTOMember since 2006
And make sure the buffer you return is a member of your plugin class, not a local buffer within the ongetsongbuffer function
 

Mensajes 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.
 

Mensajes Fri 16 Oct 20 @ 6:34 am
NicotuxHome userMember since 2014
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
 

Mensajes Fri 16 Oct 20 @ 8:03 am
AdionPRO InfinityCTOMember since 2006
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?
 

Mensajes Thu 22 Oct 20 @ 7:24 am
No worries, all my plugins are all release builds ;-)
 

Mensajes Sun 25 Oct 20 @ 4:42 pm


(Los tópicos y foros antiguos son automáticamente cerrados)