use of blue.services.render.DiskRenderServiceFactory in project blue by kunstmusik.
the class DiskRenderSettings method getAvailableDiskRenderServices.
public static DiskRenderServiceFactory[] getAvailableDiskRenderServices() {
Collection<? extends DiskRenderServiceFactory> services = Lookup.getDefault().lookupAll(DiskRenderServiceFactory.class);
ArrayList<DiskRenderServiceFactory> results = new ArrayList<>();
for (DiskRenderServiceFactory factory : services) {
if (factory.isAvailable()) {
results.add(factory);
}
}
return results.toArray(new DiskRenderServiceFactory[0]);
}
use of blue.services.render.DiskRenderServiceFactory in project blue by kunstmusik.
the class DiskRenderSettings method findDiskRenderService.
private static DiskRenderServiceFactory findDiskRenderService(String renderServiceName) {
DiskRenderServiceFactory[] services = getAvailableDiskRenderServices();
DiskRenderServiceFactory foundService = null;
if (renderServiceName == null || renderServiceName.isEmpty()) {
foundService = services[0];
} else {
for (DiskRenderServiceFactory service : services) {
if (service.toString().equals(renderServiceName)) {
foundService = service;
break;
}
}
if (foundService == null) {
foundService = services[0];
}
}
return foundService;
}
use of blue.services.render.DiskRenderServiceFactory in project blue by kunstmusik.
the class DiskRenderManager method execWaitAndCollect.
public String execWaitAndCollect(String[] args, File currentWorkingDirectory) {
DiskRenderServiceFactory factory = DiskRenderSettings.getInstance().renderServiceFactory;
DiskRenderService diskRenderService = factory.createInstance();
String csoundOutput = diskRenderService.execWaitAndCollect(args, currentWorkingDirectory);
return csoundOutput;
}
Aggregations