Browse Source

Correct last commit, deal with a few vst3 edge cases

pull/381/head
falkTX 3 years ago
parent
commit
352bcbfb72
2 changed files with 31 additions and 16 deletions
  1. +4
    -0
      Makefile.base.mk
  2. +27
    -16
      distrho/src/DistrhoPluginVST3.cpp

+ 4
- 0
Makefile.base.mk View File

@@ -352,8 +352,12 @@ endif

# backwards compat, always available/enabled
ifneq ($(FORCE_NATIVE_AUDIO_FALLBACK),true)
ifeq ($(STATIC_BUILD),true)
HAVE_JACK = $(shell $(PKG_CONFIG) --exists jack && echo true)
else
HAVE_JACK = true
endif
endif

# ---------------------------------------------------------------------------------------------------------------------
# Set Generic DGL stuff


+ 27
- 16
distrho/src/DistrhoPluginVST3.cpp View File

@@ -2537,13 +2537,8 @@ private:

if (port.busId == busId)
{
const PortGroupWithId& group(fPlugin.getPortGroupById(port.groupId));

if (group.name.isNotEmpty())
strncpy_utf16(busName, group.name, 128);
else
strncpy_utf16(busName, port.name, 128);

const String& groupName(busInfo.groups ? fPlugin.getPortGroupById(port.groupId).name : port.name);
strncpy_utf16(busName, groupName, 128);
break;
}
}
@@ -2674,23 +2669,33 @@ private:

if (port.busId != busId)
{
d_stdout("setAudioBusArrangement port.busId != busId: %d %d", port.busId, busId);
// d_stdout("setAudioBusArrangement port.busId != busId: %d %d", port.busId, busId);
continue;
}

// special case for turning mono into "stereo"
/*
if (arr == (V3_SPEAKER_L|V3_SPEAKER_R))
{
// some hosts try to make CV ports stereo, that doesn't make any sense!
if (port.hints & kAudioPortIsCV)
return false;

// force stereo mode
if (busId == 0 && busInfo.audioPorts != 0)
{
busInfo.audioPorts = 2;
enabledPorts[i] = i < 2;
}

/*
// special case for turning mono into "stereo"
if (port.groupId == kPortGroupMono)
port.groupId = kPortGroupStereo;
else if (busId == 0 && busInfo.audioPorts == 1)
busInfo.audioPorts = 2;
*/
}
*/

enabledPorts[i] = arr != 0;
break;
}
}

@@ -4801,11 +4806,17 @@ bool ENTRYFNNAME(ENTRYFNNAMEARGS)
String tmpPath(getBinaryFilename());
tmpPath.truncate(tmpPath.rfind(DISTRHO_OS_SEP));
tmpPath.truncate(tmpPath.rfind(DISTRHO_OS_SEP));
DISTRHO_SAFE_ASSERT_RETURN(tmpPath.endsWith(DISTRHO_OS_SEP_STR "Contents"), true);

tmpPath.truncate(tmpPath.rfind(DISTRHO_OS_SEP));
bundlePath = tmpPath;
d_nextBundlePath = bundlePath.buffer();
if (tmpPath.endsWith(DISTRHO_OS_SEP_STR "Contents"))
{
tmpPath.truncate(tmpPath.rfind(DISTRHO_OS_SEP));
bundlePath = tmpPath;
d_nextBundlePath = bundlePath.buffer();
}
else
{
bundlePath = "error";
}
}

// init dummy plugin and set uniqueId


Loading…
Cancel
Save