final RenderPlugIn plugIn;
final String fileName;
final long startFrame;
AudioFile af = null;
int argIdx = 1;
FilterDialog filterDlg;
try {
fileName = rom.msg.getArg( argIdx ).toString();
argIdx++;
if( argIdx < rom.msg.getArgCount() ) {
startFrame = ((Number) rom.msg.getArg( argIdx )).longValue();
} else {
startFrame = 0;
}
af = AudioFile.openAsRead( new File( fileName ));
af.seekFrame( startFrame );
plugIn = new Replace( af );
}
catch( IndexOutOfBoundsException e1 ) {
OSCRoot.failedArgCount( rom );
return;
}
catch( ClassCastException e1 ) {
OSCRoot.failedArgType( rom, argIdx );
return;
}
catch( IOException e1 ) {
if( af != null ) af.cleanUp();
OSCRoot.failed( rom, e1 );
return;
}
filterDlg = (FilterDialog) AbstractApplication.getApplication().getComponent( Main.COMP_FILTER );
if( filterDlg == null ) {
filterDlg = new FilterDialog();
}
filterDlg.process( plugIn, this, false, false );
// actionProcessAgain.setPlugIn( filterDlg.getPlugIn() );
}