Search in sources :

Example 6 with RealtimeRenderServiceFactory

use of blue.services.render.RealtimeRenderServiceFactory in project blue by kunstmusik.

the class RealtimeRenderSettingsPanel method audioOutButtonActionPerformed.

// GEN-LAST:event_midiOutCBoxActionPerformed
private void audioOutButtonActionPerformed(java.awt.event.ActionEvent evt) {
    // GEN-FIRST:event_audioOutButtonActionPerformed
    String driver = null;
    if (audioDriverCBox.isSelected()) {
        driver = (String) audioDriverCombo.getSelectedItem();
    }
    String command = csoundExecText.getText();
    RealtimeRenderServiceFactory factory = (RealtimeRenderServiceFactory) renderServiceComboBox.getSelectedItem();
    DiskRenderService service = factory.createDiskRenderService();
    List<DeviceInfo> vals = DriverUtilities.getAudioDevices(command, driver, service, false);
    Object val = chooseDriver(vals);
    if (val != null) {
        DeviceInfo info = (DeviceInfo) val;
        audioOutText.setText(info.getDeviceId());
        fireUpdate();
    }
}
Also used : DeviceInfo(blue.services.render.DeviceInfo) RealtimeRenderServiceFactory(blue.services.render.RealtimeRenderServiceFactory) DiskRenderService(blue.services.render.DiskRenderService)

Example 7 with RealtimeRenderServiceFactory

use of blue.services.render.RealtimeRenderServiceFactory in project blue by kunstmusik.

the class RealtimeRenderManager method renderProject.

protected void renderProject(BlueData data, boolean auditioning) {
    if (isRendering()) {
        stopRendering();
    }
    if (data == null) {
        this.auditioning = false;
        return;
    }
    this.auditioning = auditioning;
    StatusDisplayer.getDefault().setStatusText(BlueSystem.getString("message.generatingCSD"));
    RealtimeRenderServiceFactory factory = RealtimeRenderSettings.getInstance().renderServiceFactory;
    if (currentRenderServiceFactory != factory || currentRenderService == null || currentRenderService.getClass() != factory.getRenderServiceClass()) {
        if (currentRenderService != null) {
            currentRenderService.removePlayModeListener(realtimeListener);
        }
        currentRenderServiceFactory = factory;
        currentRenderService = factory.createInstance();
        currentRenderService.addPlayModeListener(realtimeListener);
    }
    currentRenderService.setData(data);
    try {
        currentRenderService.render();
    } catch (SoundObjectException soe) {
        ExceptionDialog.showExceptionDialog(WindowManager.getDefault().getMainWindow(), soe);
    }
}
Also used : SoundObjectException(blue.soundObject.SoundObjectException) RealtimeRenderServiceFactory(blue.services.render.RealtimeRenderServiceFactory)

Example 8 with RealtimeRenderServiceFactory

use of blue.services.render.RealtimeRenderServiceFactory in project blue by kunstmusik.

the class RealtimeRenderManager method renderForBlueLive.

public void renderForBlueLive(BlueData data) {
    if (currentBlueLiveRenderService != null && currentBlueLiveRenderService.isRunning()) {
        currentBlueLiveRenderService.stop();
    }
    if (data == null) {
        return;
    }
    StatusDisplayer.getDefault().setStatusText(BlueSystem.getString("message.generatingCSD"));
    RealtimeRenderServiceFactory factory = RealtimeRenderSettings.getInstance().renderServiceFactory;
    if (currentRenderServiceFactory != factory || currentBlueLiveRenderService == null || currentBlueLiveRenderService.getClass() != factory.getRenderServiceClass()) {
        if (currentBlueLiveRenderService != null) {
            currentBlueLiveRenderService.removePlayModeListener(blueLiveListener);
        }
        currentRenderServiceFactory = factory;
        currentBlueLiveRenderService = factory.createInstance();
        currentBlueLiveRenderService.addPlayModeListener(blueLiveListener);
    }
    currentBlueLiveRenderService.addBinding(new BlueLiveBinding(data));
    currentBlueLiveRenderService.setData(data);
    try {
        currentBlueLiveRenderService.renderForBlueLive();
    } catch (SoundObjectException soe) {
        ExceptionDialog.showExceptionDialog(WindowManager.getDefault().getMainWindow(), soe);
    }
}
Also used : SoundObjectException(blue.soundObject.SoundObjectException) RealtimeRenderServiceFactory(blue.services.render.RealtimeRenderServiceFactory)

Aggregations

RealtimeRenderServiceFactory (blue.services.render.RealtimeRenderServiceFactory)8 DeviceInfo (blue.services.render.DeviceInfo)4 DiskRenderService (blue.services.render.DiskRenderService)4 SoundObjectException (blue.soundObject.SoundObjectException)2 ArrayList (java.util.ArrayList)1