Browse Source

Fix discovery

tags/1.9.4
falkTX 12 years ago
parent
commit
11b62321d8
2 changed files with 24 additions and 15 deletions
  1. +16
    -7
      source/carla_database.py
  2. +8
    -8
      source/discovery/carla-discovery.cpp

+ 16
- 7
source/carla_database.py View File

@@ -22,10 +22,6 @@
from copy import deepcopy
from subprocess import Popen, PIPE

#try:
#from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QThread, QSettings
#from PyQt5.QtWidgets import QDialog, QTableWidgetItem
#except:
from PyQt4.QtCore import pyqtSignal, pyqtSlot, Qt, QThread, QSettings
from PyQt4.QtGui import QDialog, QTableWidgetItem

@@ -169,10 +165,23 @@ def runCarlaDiscovery(itype, stype, filename, tool, isWine=False):
plugins = []
fakeLabel = os.path.basename(filename).rsplit(".", 1)[0]

while gDiscoveryProcess.poll() is None:
while True:
try:
line = gDiscoveryProcess.stdout.readline().decode("utf-8", errors="ignore").strip()
line = gDiscoveryProcess.stdout.readline().decode("utf-8", errors="ignore")
except:
print("ERROR: discovery readline failed")
break

# line is valid, strip it
if line:
line = line.strip()

# line is invalid, try poll() again
elif gDiscoveryProcess.poll() is None:
continue

# line is invalid and poll() failed, stop here
else:
break

if line == "carla-discovery::init::-----------":
@@ -205,7 +214,7 @@ def runCarlaDiscovery(itype, stype, filename, tool, isWine=False):
try:
prop, value = line.replace("carla-discovery::", "").split("::", 1)
except:
continue
continue

if prop == "name":
pinfo['name'] = value if value else fakeLabel


+ 8
- 8
source/discovery/carla-discovery.cpp View File

@@ -1804,14 +1804,6 @@ int main(int argc, char* argv[])

if (openLib)
{
handle = lib_open(filename);

if (handle == nullptr)
{
print_lib_error(filename);
return 1;
}

if (filenameStr.contains("fluidsynth", true))
{
DISCOVERY_OUT("info", "skipping fluidsynth based plugin");
@@ -1822,6 +1814,14 @@ int main(int argc, char* argv[])
DISCOVERY_OUT("info", "skipping linuxsampler based plugin");
return 0;
}

handle = lib_open(filename);

if (handle == nullptr)
{
print_lib_error(filename);
return 1;
}
}

// never do init for dssi-vst, takes too long and it's crashy


Loading…
Cancel
Save