Package de.sciss.meloncillo.io

Examples of de.sciss.meloncillo.io.AudioTrail


  public boolean consumerRender( RenderContext context, RenderSource source )
  throws IOException
  {
    ConsumerContext      consc   = (ConsumerContext) context.getOption( KEY_CONSC );
    Transmitter        trns;
    AudioTrail        at;
    int            trnsIdx;

    for( trnsIdx = 0; trnsIdx < source.numTrns; trnsIdx++ ) {
      if( !source.trajRequest[ trnsIdx ]) continue;

      trns        = (Transmitter) context.getTransmitters().get( trnsIdx );
      at          = trns.getAudioTrail();
      if( consc.as[ trnsIdx ] == null ) {
        context.getHost().showMessage( JOptionPane.ERROR_MESSAGE,
          AbstractApplication.getApplication().getResourceString( "renderEarlyConsume" ));
        return false;
      }
     
      if( consc.bc != null ) {
        final long blendLen = consc.bc.getLen()// EEE getLen?
        final long interpOff = source.blockSpan.start - context.getTimeSpan().start;
        final long fadeOutOff = context.getTimeSpan().getLength() - blendLen;
        if( (consc.srcBuf == null) || (consc.srcBuf[ 0 ].length < source.blockBufLen) ) {
          consc.srcBuf = new float[ 2 ][ source.blockBufLen ];
        }
        at.readFrames( consc.srcBuf, 0, source.blockSpan );
        if( interpOff < blendLen ) {
          consc.bc.blend( interpOff, consc.srcBuf, 0, source.trajBlockBuf[ trnsIdx ], 0, source.trajBlockBuf[ trnsIdx ], 0, source.blockBufLen );
        }
        if( (interpOff + source.blockBufLen) > fadeOutOff ) {
          consc.bc.blend( interpOff - fadeOutOff, source.trajBlockBuf[ trnsIdx ], 0, consc.srcBuf, 0, source.trajBlockBuf[ trnsIdx ], 0, source.blockBufLen );
View Full Code Here


    if( pos < 0 ) return;
   
    try {
      for( int trnsIdx = 0; trnsIdx < numTrns; trnsIdx++ ) {
        final Transmitter  trns  = (Transmitter) collTrns.get( trnsIdx );
        final AudioTrail  at    = trns.getAudioTrail();
        at.readFrames( trnsBuf, 0, new Span( pos, pos + 1 ));
        rt_trnsLocX[ trnsIdx = trnsBuf[ 0 ][ 0 ];
        rt_trnsLocY[ trnsIdx = -trnsBuf[ 1 ][ 0 ];
      }
    }
    catch( IOException e1 ) {
View Full Code Here

TOP

Related Classes of de.sciss.meloncillo.io.AudioTrail

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.