-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmain.cpp
36 lines (29 loc) · 873 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <windows.h>
#include "ShoutVST.h"
bool oome = false;
#define VST_EXPORT(rt) extern "C" __declspec(dllexport) rt __cdecl
VST_EXPORT(int) main(audioMasterCallback audioMaster)
{
//ShoutVST::PrintF("[main] Get VST Version \n");
if (!audioMaster (0, audioMasterVersion, 0, 0, 0, 0))
return 0; // old version
//ShoutVST::PrintF("[main] new ShoutVST\n");
ShoutVST * effect = new ShoutVST(audioMaster);
if (!effect)
return 0;
//ShoutVST::PrintF("[main] Check if no problem\n");
if (oome)
{
delete effect;
return 0;
}
//ShoutVST::PrintF("[main] return\n");
return (int)effect->getAeffect();
}
HINSTANCE hInstance;
BOOL WINAPI DllMain(HINSTANCE hInst, DWORD dwReason, LPVOID lpvReserved)
{
//ShoutVST::PrintF("[main] DllMain - dwReason: %d\n",dwReason);
hInstance = hInst;
return 1;
}