Search in sources :

Example 1 with DiskRenderServiceFactory

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]);
}
Also used : DiskRenderServiceFactory(blue.services.render.DiskRenderServiceFactory) ArrayList(java.util.ArrayList)

Example 2 with DiskRenderServiceFactory

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;
}
Also used : DiskRenderServiceFactory(blue.services.render.DiskRenderServiceFactory)

Example 3 with DiskRenderServiceFactory

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;
}
Also used : DiskRenderServiceFactory(blue.services.render.DiskRenderServiceFactory) DiskRenderService(blue.services.render.DiskRenderService)

Aggregations

DiskRenderServiceFactory (blue.services.render.DiskRenderServiceFactory)3 DiskRenderService (blue.services.render.DiskRenderService)1 ArrayList (java.util.ArrayList)1