Tree-Axis ``` Processing  


Back  
Class   AudioChannel
   
Name  

getCurrentPlayFrame()

   
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");

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

void draw() {
  // print the currently playing sample frame
  println(myChannel.getCurrentPlayFrame());
}

// we are done, clean up Ess

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

Description   If an AudioChannel is playing, returns the exact sample frame being played. getCurrentPlayFrame() has a much higher resolution than cue, which during playback always points to the start of the next block of data to be sent to the playback engine. buffer.length is the playback resolution of cue in sample frames
   
Syntax  
channel.currentPlayFrame()
   
Parameters  
channel   any instance of type AudioChannel

   
Returns   int
   
Usage   Web & Application
   
 
 






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


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