Connexion rapide:  

Forum: VirtualDJ Plugins

Sujet Warning & error in code samples

Ce topic est ancien et peut contenir des informations obselètes ou incorrectes.

szemekPRO InfinityMember since 2019
Hello,
I started experimenting with code samples from https://www.virtualdj.com/wiki/Developers.html and I noticed the following issues when building plugins from samples:

in vdjDsp8.h from SDK there is warning
Non-portable path to file '"vdjPlugin8.h"'; specified path differs in case from file name on disk
https://www.virtualdj.com/wiki/Plugins_SDKv8_Dsp.html
Can you replace VdjPlugin8.h with vdjPlugin8.h?



In MyPlugin8.cpp from https://www.virtualdj.com/wiki/Plugins_SDKv8_Example1.html
there is missing semicolon at the end of line containing: if(ch==1) out[ch] = 0
and build fails because of that. Can you update this sample on your site?



Have you considered hosting your samples on Github, ready to clone by developers?
Code samples for Visual Studio and XCode would be great to get started.

Thanks in advance for your response.
 

Posté Mon 06 Apr 20 @ 4:18 pm
djcelPRO InfinityModeratorMember since 2004
Thank you for your report.
Some source codes (with project files) are also available in the plugins download area, more for the v7 version of the SDK but some with the SDK8
 

Posté Tue 07 Apr 20 @ 12:03 am
szemekPRO InfinityMember since 2019
djcel wrote :
Thank you for your report.
Some source codes (with project files) are also available in the plugins download area, more for the v7 version of the SDK but some with the SDK8


Thanks for adding missing semicolon to sample. I noticed configuration for Visual Studio, but I haven't seen anything for XCode.
I started preparing samples for XCode https://github.com/szemek/virtualdj-plugins-examples from official ones.

I discovered an issue in other sample https://www.virtualdj.com/wiki/Plugins_SDKv8_Example6.html
In MyPlugin8.cpp there is error `Use of undeclared identifier 'GetSongBuffer'`



Can you replace:
short * VDJ_API OnGetSongBuffer(int pos, int nb)
with:
short * VDJ_API CMyPlugin8::OnGetSongBuffer(int pos, int nb)
?

After that change plugin is going to build successfully.
 

Posté Thu 09 Apr 20 @ 4:52 am
djcelPRO InfinityModeratorMember since 2004
You don't need to add vdjVideo8.h for an audio plugin. You can remove it for your audio project.

I also see that my template is old for video examples

#if (defined(VDJ_WIN))
#define DIRECT3D_VERSION 0x9000
#include <d3dx9.h>
#pragma comment(lib, "d3dx9.lib")

it was designed for the 32bit PC version of VirtualDJ
The 64bit PC version uses Direct3D11 so this part needs to be updated by using the "VDJ_IS_WIN64" definition in vdjPlugin8.h

An updated code is available here

https://www.virtualdj.com/user/djcel/blogs/2221/VirtualDJ_-_Video_Effects___Transitions_(How_To).html
 

Posté Sun 12 Apr 20 @ 10:19 pm
NicotuxHome userMember since 2014
in a way to be more compatible you may also need to add to 32bit conditional (i had to with all SDK 10)
something like these :

#define VDJ_D3D9
#include <ntverp.h>
#if !defined(VER_PRODUCTBUILD) || VER_PRODUCTBUILD < 10011
#include <d3dx9.h>
#pragma comment(lib, "d3dx9.lib")
#else
#include <d3d9.h>
#pragma comment(lib, "d3d9.lib")
#endif

 

Posté Sun 12 Apr 20 @ 10:53 pm
djcelPRO InfinityModeratorMember since 2004
Hehe true. Microsoft removed it. I kept the old directx sdk on my computer.
<d3dx9.h> is more powerful to use for example to draw text or load a picture.
 

Posté Sun 12 Apr 20 @ 11:10 pm
szemekPRO InfinityMember since 2019
Thanks for updating samples.

djcel wrote :
You don't need to add vdjVideo8.h for an audio plugin. You can remove it for your audio project.

Thanks for pointing that out. I've just copied all SDK header files.

I also see that my template is old for video examples

djcel wrote :

#if (defined(VDJ_WIN))
#define DIRECT3D_VERSION 0x9000
#include <d3dx9.h>
#pragma comment(lib, "d3dx9.lib")

it was designed for the 32bit PC version of VirtualDJ
The 64bit PC version uses Direct3D11 so this part needs to be updated by using the "VDJ_IS_WIN64" definition in vdjPlugin8.h

An updated code is available here

https://www.virtualdj.com/user/djcel/blogs/2221/VirtualDJ_-_Video_Effects___Transitions_(How_To).html

Thanks for update. Right now I'm experimenting only on macOS, but for sure it will be helpful for anybody developing on Windows.
 

Posté Mon 13 Apr 20 @ 9:51 am


(Les anciens sujets et forums sont automatiquement fermés)