Skip to content

Commit 5b3417c

Browse files
committed
Merge branch 'develop'
2 parents cf494db + 254a902 commit 5b3417c

File tree

5 files changed

+64
-17
lines changed

5 files changed

+64
-17
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ project(${PROJECT_NAME})
55

66
# Project version
77
set(VERSION_MAJOR 1)
8-
set(VERSION_MINOR 1)
8+
set(VERSION_MINOR 2)
99
set(VERSION_PATCH 1)
1010

1111
# Set plugin shared library base name

README.md

+9-12
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,13 @@ The following list is not complete. It contains only plugins, that have been tes
7777
------------:|:----------:|:-------|
7878
AlgoMusic CZynthia | yes |
7979
Aly James LAB OB-Xtreme | yes |
80+
Analogic Delay by interrruptor | yes |
81+
Bionic Delay by interrruptor | yes |
8082
Blue Cat Audio Oscilloscope Multi | no | doesn't work with wine
83+
Cableguys Kickstart | no | doesn't work with wine
84+
Cableguys Volume Shaper | no | doesn't work with wine
8185
Credland Audio BigKick | no | doesn't work with wine
82-
FabFilter Total bundle | yes | haven't tested them all
86+
FabFilter plugins | yes | haven't tested them all
8387
Green Oak Software Crystal | yes |
8488
Image-Line Harmless | yes |
8589
Image-Line Sytrus | yes |
@@ -94,7 +98,7 @@ The following list is not complete. It contains only plugins, that have been tes
9498
Magnus Choir | yes |
9599
Martin Lüders pg8x | yes |
96100
Meesha Damatriks | yes |
97-
Odo Synths Double Six | partly | GUI doesn't show, but presets are available and functional
101+
Odo Synths Double Six | partly | GUI issues
98102
Peavey Revalver Mark III.V | yes |
99103
ReFX Nexus2 | yes |
100104
ReFX Vanguard | yes |
@@ -104,22 +108,15 @@ The following list is not complete. It contains only plugins, that have been tes
104108
Sonic Cat LFX-1310 | yes |
105109
Sonic Charge Cyclone | yes |
106110
Smartelectronix s(M)exoscope | yes |
111+
Spectrasonics Omnisphere | yes |
107112
SQ8L by Siegfried Kullmann | yes |
108113
SuperWave P8 | yes |
109114
Synapse Audio DUNE 2 | yes |
110115
Synth1 by Ichiro Toda | yes |
111116
Tone2 FireBird | yes |
112117
Tone2 Nemesis | yes |
113118
Tone2 Saurus | yes |
114-
u-he A.C.E. | yes | Linux version is also available
115-
u-he Bazille | yes | Linux version is also available
116-
u-he Diva | yes | Linux version is also available
117-
u-he Hive | yes | Linux version is also available
118-
u-he Presswerk | yes | Linux version is also available
119-
u-he Satin | yes | Linux version is also available
120-
u-he Uhbik | yes | Linux version is also available
121-
u-he Zebra2 | yes | Linux version is also available
119+
u-he plugins | yes | Linux version is also available
122120
Variety of Sound plugins | yes |
123-
Voxengo SPAN | yes |
124-
Voxengo SPAN Pro | mostly | inter plugin routing doesn't work (architecture issue)
121+
Voxengo plugins | mostly | inter plugin routing doesn't work (architecture issue)
125122
Xfer Serum | no | the GUI doesn't appear (wine issue), but audio works

src/common/protocol.h

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ struct PluginInfo {
3939
i32 paramCount;
4040
i32 inputCount;
4141
i32 outputCount;
42+
i32 initialDelay;
4243
i32 uniqueId;
4344
i32 version;
4445
} __attribute__((packed));

src/host/host.cpp

+28-2
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ bool Host::initialize(const char* fileName, int portId)
113113
TRACE("Initializing VST plugin...");
114114

115115
effect_ = vstMainProc(audioMasterProc);
116-
if(!effect_) {
116+
if(!effect_ || effect_->magic != kEffectMagic) {
117117
ERROR("Unable to initialize VST plugin");
118118
controlPort_.disconnect();
119119
callbackPort_.disconnect();
@@ -134,9 +134,17 @@ bool Host::initialize(const char* fileName, int portId)
134134
info->paramCount = effect_->numParams;
135135
info->inputCount = effect_->numInputs;
136136
info->outputCount = effect_->numOutputs;
137+
info->initialDelay = effect_->initialDelay;
137138
info->uniqueId = effect_->uniqueID;
138139
info->version = effect_->version;
139140

141+
// Workaround for plugins from Waves
142+
char vendorName[kVstMaxVendorStrLen];
143+
if(effect_->dispatcher(effect_, effGetVendorString, 0, 0, &vendorName, 0.0f)) {
144+
if(strncmp(vendorName, "Waves", kVstMaxVendorStrLen) == 0)
145+
info->flags |= effFlagsHasEditor;
146+
}
147+
140148
controlPort_.sendResponse();
141149

142150
isInitialized_ = true;
@@ -315,6 +323,11 @@ bool Host::handleDispatch(DataFrame* frame)
315323
case effEndSetProgram:
316324
case effStopProcess:
317325
case effGetTailSize:
326+
case effSetEditKnobMode:
327+
case __effConnectInputDeprecated:
328+
case __effConnectOutputDeprecated:
329+
case __effKeysRequiredDeprecated:
330+
case __effIdentifyDeprecated:
318331
frame->value = effect_->dispatcher(effect_, frame->opcode, frame->index,
319332
frame->value, nullptr, frame->opt);
320333
break;
@@ -425,6 +438,7 @@ bool Host::handleDispatch(DataFrame* frame)
425438
case effBeginLoadBank:
426439
case effBeginLoadProgram:
427440
case effGetEffectName:
441+
case effShellGetNextPlugin:
428442
frame->value = effect_->dispatcher(effect_, frame->opcode, frame->index,
429443
frame->value, frame->data, frame->opt);
430444
break;
@@ -464,6 +478,17 @@ bool Host::handleDispatch(DataFrame* frame)
464478
chunk_.clear();
465479
break; }
466480

481+
case effSetSpeakerArrangement: {
482+
u8* data = frame->data;
483+
484+
intptr_t value = reinterpret_cast<intptr_t>(data);
485+
void* ptr = data + sizeof(VstSpeakerArrangement);
486+
487+
frame->value = effect_->dispatcher(effect_, frame->opcode, frame->index, value,
488+
ptr, frame->opt);
489+
490+
break; }
491+
467492
default:
468493
ERROR("Unhandled dispatch event: %s", kDispatchEvents[frame->opcode]);
469494
}
@@ -549,12 +574,13 @@ intptr_t Host::audioMaster(i32 opcode, i32 index, intptr_t value, void* ptr, flo
549574
case audioMasterGetOutputLatency:
550575
case audioMasterGetCurrentProcessLevel:
551576
case audioMasterGetAutomationState:
577+
case audioMasterCurrentId:
552578
callbackPort_.sendRequest();
553579
callbackPort_.waitResponse();
554580
return frame->value;
555581

556582
// FIXME Passing the audioMasterUpdateDisplay request to the plugin endpoint leads to
557-
// crash with some plugins.
583+
// crash (or lock in Renoise) with some plugins (u-he TripleCheese).
558584
case audioMasterUpdateDisplay:
559585
return 1;
560586

src/plugin/plugin.cpp

+25-2
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ Plugin::Plugin(const std::string& vstPath, const std::string& hostPath,
110110
effect_->numParams = info->paramCount;
111111
effect_->numInputs = info->inputCount;
112112
effect_->numOutputs = info->outputCount;
113+
effect_->initialDelay = info->initialDelay;
113114
effect_->uniqueID = info->uniqueId;
114115
effect_->version = info->version;
115116

@@ -119,6 +120,7 @@ Plugin::Plugin(const std::string& vstPath, const std::string& hostPath,
119120
DEBUG(" param count: %d", effect_->numParams);
120121
DEBUG(" input count: %d", effect_->numInputs);
121122
DEBUG(" output count: %d", effect_->numOutputs);
123+
DEBUG(" initial delay: %d", effect_->initialDelay);
122124
DEBUG(" unique ID: 0x%08X", effect_->uniqueID);
123125
DEBUG(" version: %d", effect_->version);
124126
}
@@ -197,6 +199,7 @@ intptr_t Plugin::handleAudioMaster()
197199
case audioMasterGetOutputLatency:
198200
case audioMasterGetCurrentProcessLevel:
199201
case audioMasterGetAutomationState:
202+
case audioMasterCurrentId:
200203
return masterProc_(effect_, frame->opcode, frame->index, frame->value, nullptr,
201204
frame->opt);
202205

@@ -226,7 +229,7 @@ intptr_t Plugin::handleAudioMaster()
226229
return masterProc_(effect_, frame->opcode, 0, 0, e, 0.0f); }
227230
}
228231

229-
ERROR("Unhandled audio master event: %s", kAudioMasterEvents[frame->opcode]);
232+
ERROR("Unhandled audio master event: %s %d", kAudioMasterEvents[frame->opcode], frame->opcode);
230233
return 0;
231234
}
232235

@@ -269,6 +272,11 @@ intptr_t Plugin::dispatch(DataPort* port, i32 opcode, i32 index, intptr_t value,
269272
case effGetNumMidiOutputChannels:
270273
case effSetPanLaw:
271274
case effGetTailSize:
275+
case effSetEditKnobMode:
276+
case __effConnectInputDeprecated:
277+
case __effConnectOutputDeprecated:
278+
case __effKeysRequiredDeprecated:
279+
case __effIdentifyDeprecated:
272280
port->sendRequest();
273281
port->waitResponse();
274282
return frame->value;
@@ -398,7 +406,8 @@ intptr_t Plugin::dispatch(DataPort* port, i32 opcode, i32 index, intptr_t value,
398406
return frame->value; }
399407

400408
case effGetVendorString:
401-
case effGetProductString: {
409+
case effGetProductString:
410+
case effShellGetNextPlugin: {
402411
port->sendRequest();
403412
port->waitResponse();
404413

@@ -579,6 +588,20 @@ intptr_t Plugin::dispatch(DataPort* port, i32 opcode, i32 index, intptr_t value,
579588
port->sendRequest();
580589
port->waitResponse();
581590
return frame->value;
591+
592+
case effSetSpeakerArrangement: {
593+
void* pluginInput = reinterpret_cast<void*>(value);
594+
void* pluginOutput = ptr;
595+
596+
u8* data = frame->data;
597+
std::memcpy(data, pluginInput, sizeof(VstSpeakerArrangement));
598+
599+
data += sizeof(VstSpeakerArrangement);
600+
std::memcpy(data, pluginOutput, sizeof(VstSpeakerArrangement));
601+
602+
port->sendRequest();
603+
port->waitResponse();
604+
return frame->value; }
582605
}
583606

584607
ERROR("Unhandled dispatch event: %s", kDispatchEvents[opcode]);

0 commit comments

Comments
 (0)