Package de.sciss.common

Examples of de.sciss.common.ProcessingThread$CancelledException


      final String name = getResourceString( "menuClose" );
      if( !confirmCancel( name )) {
        wasClosed.set( false );
        return null;
      }
      final ProcessingThread pt = confirmUnsaved( name, wasClosed );
      if( pt != null ) {
        pt.addListener( new ProcessingThread.Listener() {
          public void processStarted( ProcessingThread.Event e ) { /* ignored */ }
          public void processStopped( ProcessingThread.Event e )
          {
            if( e.isDone() ) {
              documentClosed();
View Full Code Here


    {
      final ClipboardTrackList  tl    = doc.getSelectionAsTrackList();
      final Session        doc2;
      final AudioFileDescr    afd, afd2;
      final int          selChans;
      final ProcessingThread    pt;
     
      if( tl == null ) return;
     
      selChans      = tl.getTrackNum( AudioTrail.class );
     
      afd          = doc.getDisplayDescr();
      afd2        = new AudioFileDescr();
      afd2.bitsPerSample  = afd.bitsPerSample;
      afd2.channels    = selChans;
      afd2.rate      = afd.rate;
      afd2.sampleFormat  = afd.sampleFormat;
     
      doc2        = ((MenuFactory) app.getMenuFactory()).newDocument( afd2 );
      if( doc2 == null ) {
        // it's important that the clipboard tl be diposed
        // when not used any more
        tl.dispose();
        return;
      }
     
      pt = doc2.pasteTrackList( tl, 0, getResourceString( "menuPaste" ), Session.EDIT_INSERT );
      if( pt != null ) {
        pt.addListener( new ProcessingThread.Listener() {
          public void processStarted( ProcessingThread.Event e1 ) { /* ignored */ }
          public void processStopped( ProcessingThread.Event e2 ) {
            tl.dispose();
          }
        });
View Full Code Here

      perform();
    }
   
    public void perform()
    {
      final ProcessingThread pt = closeDocument( false, new Flag( false ));
      if( pt != null ) doc.start( pt );
    }
View Full Code Here

    }

    protected void perform( String name, Span span, AudioFileDescr[] afds,
                int[] channelMap, boolean saveMarkers, boolean asCopy, boolean openAfterSave )
    {
      final ProcessingThread pt = initiate( name, span, afds, channelMap, saveMarkers, asCopy, openAfterSave );
      if( pt != null ) doc.start( pt );
    }
View Full Code Here

    }

    protected ProcessingThread initiate( String name, final Span span, final AudioFileDescr[] afds,
                       int[] channelMap, boolean saveMarkers, final boolean asCopy, final boolean openAfterSave )
    {
      final ProcessingThread pt = doc.procSave( name, span, afds, channelMap, saveMarkers, asCopy );
      if( pt == null ) return null;
     
      pt.addListener( new ProcessingThread.Listener() {
        public void processStopped( ProcessingThread.Event e )
        {
          if( !e.isDone() ) return;

          wpHaveWarned = false;
View Full Code Here

      span.replaceStart( span.stop - consc.bcPost.getLen() );

    progress    = 0.0f;
//    pt  = new ProcessingThread( this, doc.getFrame(), doc.bird, plugIn.getName(), new Object[] { context, null },
//                  Session.DOOR_ALL );
    pt  = new ProcessingThread( this, doc.getFrame(), plugIn.getName() );
    pt.putClientArg( "context", context );
    pt.putClientArg( "source", source );
    pt.putClientArg( "rar", rar );
    pt.putClientArg( "inTrnsLen", new Integer( inTrnsLen ));
//    pt.putClientArg( "tis", Track.getInfos( doc.selectedTracks.getAll(), doc.tracks.getAll() ));
View Full Code Here

  private boolean forcedQuit = false;

  public synchronized void quit()
  {
    final Flag        confirmed  = new Flag( false );
    final ProcessingThread  pt      = getMenuFactory().closeAll( forcedQuit, confirmed );

    if( pt != null ) {
      pt.addListener( quitAfterSaveListener );
      ((BasicDocument) pt.getClientArg( "doc" )).start( pt );
    } else if( confirmed.isSet() ) {
      OSCRoot.getInstance().quit();
      SuperColliderClient.getInstance().quit();
      super.quit();
    }
View Full Code Here

  {
    if( frame == null ) {
      OSCRoot.failed( rom.msg, getResourceString( "errWindowNotFound" ));
    }
 
    final ProcessingThread  proc;
    final boolean      force;

    try {
      if( rom.msg.getArgCount() > 1 ) {
        force = ((Number) rom.msg.getArg( 1 )).intValue() != 0;
View Full Code Here

   "insertSilence", <numFrames>
   */
  public void oscCmd_insertSilence( RoutedOSCMessage rom )
  {
    final long        pos, numFrames;
    final ProcessingThread  proc;
    int            argIdx  = 1;
 
//    if( !bird.attemptShared( DOOR_TIME, 250 )) return;
    try {
      pos      = timeline.getPosition();
View Full Code Here

     @synchronization  this method is to be called in the event thread
     */
    protected ProcessingThread initiate( String procName, Span span, AudioFileDescr[] descrs,
                       int[] channelMap, boolean saveMarkers, boolean asCopy )
    {
      final ProcessingThread proc;
   
      getTransport().stop();
      if( !checkProcess() ) return null;
     
//      pt        = new ProcessingThread( this, getFrame(), bird, name, args, Session.DOOR_ALL );
      proc        = new ProcessingThread( this, getFrame(), procName );
      proc.putClientArg( "afds", descrs );
      proc.putClientArg( "doc", Session.this );
      proc.putClientArg( "asCopy", new Boolean( asCopy ));
      proc.putClientArg( "chanMap", channelMap );
      proc.putClientArg( "markers", new Boolean( saveMarkers ));
      proc.putClientArg( "span", span == null ? new Span( 0, timeline.getLength() ) : span );
      return proc;
    }
View Full Code Here

TOP

Related Classes of de.sciss.common.ProcessingThread$CancelledException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.