Examples of alloc()


Examples of com.orientechnologies.orient.core.serialization.serializer.record.binary.BytesContainer.alloc()

  }

  @Test
  public void testReallocSimple() {
    BytesContainer bytesContainer = new BytesContainer();
    bytesContainer.alloc((short) 2050);
    assertTrue(bytesContainer.bytes.length > 2050);
    assertEquals(bytesContainer.offset, 2050);
  }

  @Test
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.record.binary.BytesContainer.alloc()

  }

  @Test
  public void testBorderReallocSimple() {
    BytesContainer bytesContainer = new BytesContainer();
    bytesContainer.alloc((short) 1024);
    int pos = bytesContainer.alloc((short) 1);
    bytesContainer.bytes[pos] = 0;
    assertTrue(bytesContainer.bytes.length >= 1025);
    assertEquals(bytesContainer.offset, 1025);
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.record.binary.BytesContainer.alloc()

  @Test
  public void testBorderReallocSimple() {
    BytesContainer bytesContainer = new BytesContainer();
    bytesContainer.alloc((short) 1024);
    int pos = bytesContainer.alloc((short) 1);
    bytesContainer.bytes[pos] = 0;
    assertTrue(bytesContainer.bytes.length >= 1025);
    assertEquals(bytesContainer.offset, 1025);
  }
View Full Code Here

Examples of de.sciss.eisenkraut.io.AudioTrail.alloc()

//      context.getSourceRate(), context.getTimeSpan().getLength() / 2, context.getTimeSpan().getLength() / 2 ); // XXXXXXX

    at        = consc.doc.getAudioTrail();
// XXX
//    consc.bs    = mte.beginOverwrite( context.getTimeSpan(), consc.bc, consc.edit );
    consc.as    = at.alloc( span );
    consc.progOff  = getProgression();
    consc.progWeight= (1.0f - consc.progOff) / span.getLength();
   
    return true;
  }
View Full Code Here

Examples of de.sciss.meloncillo.io.AudioTrail.alloc()

        for( int i = 0; i < collTrns.size(); i++ ) {
          trns  = (Transmitter) collTrns.get( i );
          at    = trns.getAudioTrail();

//          bs = at.beginOverwrite( span, bc, edit );
          as = at.alloc( span );

          // XXX has to be called for each trns?
          initFunctionEvaluation();

          for( start = span.getStart(), interpOff = 0; start < span.getStop();
View Full Code Here

Examples of de.sciss.meloncillo.io.AudioTrail.alloc()

    try {
      for( i = 0; i < collTrns.size(); i++ ) {
        trns  = (Transmitter) collTrns.get( i );
        at    = trns.getAudioTrail();
        as    = at.alloc( span );
//        bs = at.beginOverwrite( span, bc, edit );
        for( start = span.getStart(), interpOff = 0; start < span.getStop();
           start += len, interpOff += len ) {

          len = (int) Math.min( 4096, span.getStop() - start );
View Full Code Here

Examples of de.sciss.meloncillo.io.AudioTrail.alloc()

            buf[1][j] = f2;
          }
          trns  = (Transmitter) collNewTrns.get( i );
          at    = trns.getAudioTrail();
//          ts    = at.beginInsert( span, edit );
          as    = at.alloc( span );
          for( long framesWritten = 0, frames = span.getLength(); framesWritten < frames; ) {
            chunkLen = (int) Math.min( 4096, frames - framesWritten );
//            at.continueWrite( ts, buf, 0, j );
            as.writeFrames( buf, 0, new Span( span.start + framesWritten, span.start + framesWritten + chunkLen ));
            framesWritten += chunkLen;
View Full Code Here

Examples of de.sciss.meloncillo.io.AudioTrail.alloc()

      if( !source.trajRequest[ trnsIdx ]) continue;
     
      trns        = (Transmitter) context.getTransmitters().get( trnsIdx );
      at          = trns.getAudioTrail();
//      consc.bs[ trnsIdx ]  = at.beginOverwrite( context.getTimeSpan(), consc.bc, consc.edit );
      consc.as[ trnsIdx= at.alloc( context.getTimeSpan() );
    }
   
    return true;
  }
View Full Code Here

Examples of etch.util.core.nio.ByteBufferPool.alloc()

  /** @throws Exception */
  @Test
  public void alloc1() throws Exception
  {
    ByteBufferPool p = new ByteBufferPool( 4096, 0, 10, 0, 0 );
    ByteBuffer b = p.alloc( null );
    assertNotNull( b );
    assertEquals( 4096, b.limit() );
    assertEquals( 1, p.used() );
    p.release( b );
    assertEquals( 0, p.used() );
View Full Code Here

Examples of etch.util.core.nio.ByteBufferPool.alloc()

  /** @throws Exception */
  @Test
  public void alloc2() throws Exception
  {
    ByteBufferPool p = new ByteBufferPool( 1024, 0, 10, 0, 0 );
    ByteBuffer b = p.alloc( null );
    assertNotNull( b );
    assertEquals( 1024, b.limit() );
    assertEquals( 1, p.used() );
    p.release( b );
    assertEquals( 0, p.used() );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.