Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
psycha0s committed Apr 15, 2015
2 parents b6d8498 + f4452c9 commit d50b987
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 37 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ project(${PROJECT_NAME})
# Project version
set(VERSION_MAJOR 1)
set(VERSION_MINOR 0)
set(VERSION_PATCH 1)
set(VERSION_PATCH 2)

# Set plugin shared library base name
set(PLUGIN_BASENAME ${PROJECT_NAME}-plugin)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ The following list is not complete. It contains only plugins, that have been tes
u-he Satin | yes | Linux version is also available
u-he Uhbik | yes | Linux version is also available
u-he Zebra2 | yes | Linux version is also available
Variety of Sound | no | crash immediately
Variety of Sound plugins | yes |
Voxengo SPAN | yes |
Voxengo SPAN Pro | mostly | inter plugin routing doesn't work (architecture issue)
Xfer Serum | partly | the GUI doesn't appear (wine issue), but audio works
Expand Down
4 changes: 3 additions & 1 deletion src/host/host.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,10 @@ bool Host::initialize(const char* fileName, int portId)

bool Host::processRequest()
{
if(!controlPort_.isConnected())
if(!controlPort_.isConnected()) {
TRACE("Control port isn't connected anymore, exiting");
return false;
}

if(!controlPort_.waitRequest(20))
return true;
Expand Down
1 change: 1 addition & 0 deletions src/host/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ int main(int argc, const char* argv[])
}
}

TRACE("Terminating the host endpoint...");
delete host;

TRACE("Host endpoint terminated");
Expand Down
87 changes: 53 additions & 34 deletions src/plugin/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,14 @@ intptr_t Plugin::handleAudioMaster()
intptr_t Plugin::dispatch(DataPort* port, i32 opcode, i32 index, intptr_t value,
void* ptr, float opt)
{
if(opcode != effCanBeAutomated && opcode != effGetProgramNameIndexed &&
opcode != effEditIdle && opcode != effGetParamDisplay &&
opcode != effGetParamLabel && opcode != effGetParameterProperties) {
FLOOD("dispatch: %s", kDispatchEvents[opcode]);
// if(opcode != effCanBeAutomated && opcode != effGetProgramNameIndexed &&
// opcode != effEditIdle && opcode != effGetParamDisplay &&
// opcode != effGetParamLabel && opcode != effGetParameterProperties) {
// FLOOD("dispatch: %s", kDispatchEvents[opcode]);
// }

if(opcode != effEditIdle && opcode) {
FLOOD("(%p) dispatch: %s", std::this_thread::get_id(), kDispatchEvents[opcode]);
}

DataFrame* frame = port->frame<DataFrame>();
Expand Down Expand Up @@ -378,16 +382,19 @@ intptr_t Plugin::dispatch(DataPort* port, i32 opcode, i32 index, intptr_t value,
port->waitResponse();
return frame->value; }

case effGetProgramName: {
case effGetProgramName:
port->sendRequest();
port->waitResponse();

const char* source = reinterpret_cast<const char*>(frame->data);
char* dest = static_cast<char*>(ptr);
if(frame->value) {
const char* source = reinterpret_cast<const char*>(frame->data);
char* dest = static_cast<char*>(ptr);

std::strncpy(dest, source, kVstMaxProgNameLen);
dest[kVstMaxProgNameLen-1] = '\0';
return frame->value; }
std::strncpy(dest, source, kVstMaxProgNameLen);
dest[kVstMaxProgNameLen-1] = '\0';
}

return frame->value;

case effSetProgramName: {
const char* source = static_cast<const char*>(ptr);
Expand All @@ -401,40 +408,49 @@ intptr_t Plugin::dispatch(DataPort* port, i32 opcode, i32 index, intptr_t value,
return frame->value; }

case effGetVendorString:
case effGetProductString: {
case effGetProductString:
port->sendRequest();
port->waitResponse();

const char* source = reinterpret_cast<const char*>(frame->data);
char* dest = static_cast<char*>(ptr);
if(frame->value) {
const char* source = reinterpret_cast<const char*>(frame->data);
char* dest = static_cast<char*>(ptr);

std::strncpy(dest, source, kVstMaxVendorStrLen);
dest[kVstMaxVendorStrLen-1] = '\0';
return frame->value; }
std::strncpy(dest, source, kVstMaxVendorStrLen);
dest[kVstMaxVendorStrLen-1] = '\0';
}

return frame->value;

case effGetParamName:
case effGetParamLabel:
case effGetParamDisplay: {
case effGetParamDisplay:
port->sendRequest();
port->waitResponse();

const char* source = reinterpret_cast<const char*>(frame->data);
char* dest = static_cast<char*>(ptr);
if(frame->value) {
const char* source = reinterpret_cast<const char*>(frame->data);
char* dest = static_cast<char*>(ptr);

std::strncpy(dest, source, kVstMaxParamStrLen);
dest[kVstMaxParamStrLen-1] = '\0';
return frame->value; }
std::strncpy(dest, source, kVstMaxParamStrLen);
dest[kVstMaxParamStrLen-1] = '\0';
}

case effGetEffectName: {
return frame->value;

case effGetEffectName:
port->sendRequest();
port->waitResponse();

const char* source = reinterpret_cast<const char*>(frame->data);
char* dest = static_cast<char*>(ptr);
if(frame->value) {
const char* source = reinterpret_cast<const char*>(frame->data);
char* dest = static_cast<char*>(ptr);

std::strncpy(dest, source, kVstMaxEffectNameLen);
dest[kVstMaxEffectNameLen-1] = '\0';
return frame->value; }
std::strncpy(dest, source, kVstMaxEffectNameLen);
dest[kVstMaxEffectNameLen-1] = '\0';
}

return frame->value;

case effGetParameterProperties:
port->sendRequest();
Expand All @@ -451,16 +467,19 @@ intptr_t Plugin::dispatch(DataPort* port, i32 opcode, i32 index, intptr_t value,
std::memcpy(ptr, frame->data, sizeof(VstPinProperties));
return frame->value;

case effGetProgramNameIndexed: {
case effGetProgramNameIndexed:
port->sendRequest();
port->waitResponse();

const char* source = reinterpret_cast<const char*>(frame->data);
char* dest = static_cast<char*>(ptr);
if(frame->value) {
const char* source = reinterpret_cast<const char*>(frame->data);
char* dest = static_cast<char*>(ptr);

std::strncpy(dest, source, kVstMaxProgNameLen);
dest[kVstMaxProgNameLen-1] = '\0';
return frame->value; }
std::strncpy(dest, source, kVstMaxProgNameLen);
dest[kVstMaxProgNameLen-1] = '\0';
}

return frame->value;

case effGetMidiKeyName:
port->sendRequest();
Expand Down

0 comments on commit d50b987

Please sign in to comment.