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();
}
}
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);
}
}
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);
}
}
Aggregations