Improved: Updated to Visual Studio 2019 and Qt 5.15.2. Running Equalizer APO requires Universal CRT now, which means that Windows versions before 10 may need additional Windows updates or the Visual C++ Redistributable for Visual Studio 2015 - 2019 needs to be installed (installer provides assistance).
This commit is contained in:
1 parent
3d51af7364
commit
c692f0639b
94 files changed
+362
-184
No files matched your search
@@ -19,6 +19,7 @@
|
||||
|
||||
#include "stdafx.h"
|
||||
#include <wincrypt.h>
|
||||
#include <inttypes.h>
|
||||
#include "StringHelper.h"
|
||||
#include "version.h"
|
||||
#include "VSTPluginLibrary.h"
|
||||
@@ -32,7 +33,7 @@ static intptr_t callback(AEffect* effect, int32_t opcode, int32_t index, intptr_
|
||||
{
|
||||
VSTPluginInstance* instance = effect != NULL ? (VSTPluginInstance*)effect->user : NULL;
|
||||
#ifdef _DEBUG
|
||||
printf("vst: %p opcode: %d index: %d value: %d ptr: %p opt: %f user: %p\n",
|
||||
printf("vst: %p opcode: %d index: %d value: %" PRIdPTR " ptr: %p opt: %f user: %p\n",
|
||||
effect, opcode, index, value, ptr, opt, effect != NULL ? effect->user : NULL);
|
||||
fflush(stdout);
|
||||
#endif
|
||||
@@ -59,10 +60,10 @@ static intptr_t callback(AEffect* effect, int32_t opcode, int32_t index, intptr_
|
||||
return 0;
|
||||
|
||||
case audioMasterNeedIdle:
|
||||
return effect->dispatcher(effect, effIdle, 0, 0, NULL, 0.0f);
|
||||
return effect != NULL ? effect->dispatcher(effect, effIdle, 0, 0, NULL, 0.0f) : 0;
|
||||
|
||||
case audioMasterUpdateDisplay:
|
||||
return effect->dispatcher(effect, effEditIdle, 0, 0, NULL, 0.0f);
|
||||
return effect != NULL ? effect->dispatcher(effect, effEditIdle, 0, 0, NULL, 0.0f) : 0;
|
||||
|
||||
case audioMasterGetTime:
|
||||
return 0;
|
||||
@@ -199,6 +200,7 @@ std::wstring VSTPluginInstance::getName() const
|
||||
char buf[256];
|
||||
memset(buf, 0, sizeof(buf));
|
||||
effect->dispatcher(effect, effGetEffectName, 0, 0, buf, 0.0f);
|
||||
buf[255] = '\0'; // just to be sure
|
||||
|
||||
return StringHelper::toWString(buf, CP_UTF8);
|
||||
}
|
||||
@@ -271,6 +273,7 @@ void VSTPluginInstance::writeToEffect(const std::wstring& chunkData, const std::
|
||||
{
|
||||
char buf[256];
|
||||
effect->dispatcher(effect, effGetParamName, i, 0, buf, 0.0f);
|
||||
buf[255] = '\0'; // just to be sure
|
||||
wstring name = StringHelper::toWString(buf, CP_UTF8);
|
||||
auto it = paramMap.find(name);
|
||||
if (it != paramMap.end())
|
||||
@@ -291,7 +294,7 @@ void VSTPluginInstance::readFromEffect(std::wstring& chunkData, std::unordered_m
|
||||
{
|
||||
BYTE* chunk = NULL;
|
||||
int size = (int)effect->dispatcher(effect, effGetChunk, 1, 0, &chunk, 0.0f);
|
||||
DWORD stringLength;
|
||||
DWORD stringLength = 0;
|
||||
CryptBinaryToStringW(chunk, size, CRYPT_STRING_BASE64 | CRYPT_STRING_NOCRLF, NULL, &stringLength);
|
||||
wchar_t* string = new wchar_t[stringLength];
|
||||
if (CryptBinaryToStringW(chunk, size, CRYPT_STRING_BASE64 | CRYPT_STRING_NOCRLF, string, &stringLength) == TRUE)
|
||||
@@ -304,6 +307,7 @@ void VSTPluginInstance::readFromEffect(std::wstring& chunkData, std::unordered_m
|
||||
{
|
||||
char buf[256];
|
||||
effect->dispatcher(effect, effGetParamName, i, 0, buf, 0.0f);
|
||||
buf[255] = '\0'; // just to be sure
|
||||
float value = effect->getParameter(effect, i);
|
||||
paramMap[StringHelper::toWString(buf, CP_UTF8)] = value;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user