Tree-Axis ``` Processing  


Back  
Class   AudioChannel
   
Name  

adjustChannel()

   
Examples  
// Example by Krister Olsson

import krister.Ess.*;

AudioChannel myChannel;

void setup() {
  size(256,200);

  // start up Ess
  Ess.start(this);

  // load "cell.aif" into a new AudioChannel
  myChannel=new AudioChannel("cell.aif");
  
  // add an additional 3 seconds to the beginning
  myChannel.adjustChannel(myChannel.frames(3000),Ess.BEGINNING);
  
  // set the in loop point to 0
  myChannel.in(0);
  
  // set the out loop point to the new end of the sound
  myChannel.out(myChannel.size);

  // start the sound looping forever
  myChannel.play(Ess.FOREVER);
}

void draw() {
}

// we are done, clean up Ess

public void stop() {
  Ess.stop();
  super.stop();
}
												 

Description   Adjusts the size of an AudioChannel by either adding sample frames to or subtracting sample frames from the beginning or end of the AudioChannell. Added sample frames are silenced
   
Syntax  
channel.adjustChannel(size, location)
   
Parameters  
channel   any instance AudioChannel

size   int: the amount to grow or shrink sample buffer in sample frames

location   Ess.BEGINNING or Ess.END

   
Returns   nothing
   
Usage   Web & Application
   
 
 






   
 
Updated: Tue May 31 04:52:38 PDT 2006


 
  Questions, comments, corrections: e-mail Krister Olsson.