FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Bugs
   Website, Reference, Example Bugs
(Moderator: REAS)
   sonia's readChannel() example has read() instead
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: sonia's readChannel() example has read() instead  (Read 474 times)
mattgilbert

tangramkid WWW Email
sonia's readChannel() example has read() instead
« on: Apr 23rd, 2004, 7:27pm »

small typo:
 
read(...) should be readChannel(...) in the readChannel() reference. Copied below:
 
 
// Populate the data[] array with sample data.  
// Notes: Make sure to include the specified audio file in your project's 'data' folder.  
 
Sample mySample;  
 
float[] data;  
void setup() {  
  size(100,100);  
  Sonia.start(this);  
  mySample = new Sample("sine.aif");  
  data = new float[mySample.getNumFrames()];//creates a new array the length of the sample  
  mySample.read(Sonia.RIGHT, data);  //****should be readChannel()***
}  
 
public void stop(){  
  Sonia.stop();  
  super.stop();  
}  
 
Pages: 1 

« Previous topic | Next topic »