 |
 |
 |
| Name |
|
AudioChannel
|
 |
|
|
| 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 Channel
myChannel=new AudioChannel("cell.aif");
// 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 |
|
The AudioChannel class is used to create mono sound channels for the playback of prerendered sample data. There is a JavaSound limit of 32 AudioChannels and AudioStreams (combined) per sketch. You can destroy or repurpose AudioChannels or AudioStreams to circumvent this limit. IMPORTANT: Many methods called by AudioChannels with sample data sizes of 0 will fail |
 |
|
|
 |
|
|
| Constructors |
|
AudioChannel()
AudioChannel(size)
AudioChannel(size, rate)
AudioChannel(filename)
AudioChannel(filename, lrChannel)
|
 |
|
|
| Parameters |
|
| size |
|
int: the AudioChannel's sample buffer size in frames. The default is 0
|
| rate |
|
float: the sample rate of the AudioChannel. The default is 44.1kHz
|
| filename |
|
String: name of sound to load
|
| lrChannel |
|
for stereo sounds, the channel to load: Ess.MIX (the default), Ess.LEFT, or Ess.RIGHT
|
|
 |
|
|
| Usage |
|
Web & Application |
 |
|
|