 |
 |
 |
 |
| Name |
|
volume() |
 |
|
|
| Examples |
|
BSound clong;
void setup() {
clong = loadSound("clong.wav");
repeat(clong);
}
void loop() {
if(mousePressed) {
volume(clong, 9.0);
} else {
volume(clong, 1.0);
}
}
|
|
|
| Description |
|
Changes the volume of the selected BSound object. A parameter value of 1.0 make no changes, 0.5 halves the volume, and 2.0 doubles the volume. High values can cause clipping and distortion. |
 |
|
|
| Syntax |
|
volume(sound, v);
|
 |
|
|
| Parameters |
|
| sound |
|
BSound: sound object
|
| s |
|
float: new volume multiplier
|
|
 |
|
|
| Usage |
|
Web & Application |
 |
|
|
| Related |
|
BSound speed() |
|