Skip to content

Commit

Permalink
turning volume down on docs
Browse files Browse the repository at this point in the history
  • Loading branch information
therewasaguy committed Apr 13, 2015
1 parent 6869f8f commit 63e466f
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 17 deletions.
14 changes: 14 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,20 @@ module.exports = function(grunt) {
src: ['test/unit/**/*.js']
}
},
yuidoc: {
compile: {
name: '<%= pkg.name %>',
description: '<%= pkg.description %>',
version: '<%= pkg.version %>',
url: '<%= pkg.homepage %>',
options: {
paths: ['src/'],
//helpers: [],
themedir: 'docs/yuidoc-p5-theme/',
outdir: 'docs/reference/'
}
}
},
watch: {
// p5 dist
main: {
Expand Down
7 changes: 2 additions & 5 deletions lib/p5.sound.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! p5.sound.js v0.1.8 2015-03-27 */
/*! p5.sound.js v0.1.8 2015-04-10 */
(function (root, factory) {
if (typeof define === 'function' && define.amd)
define('p5.sound', ['p5'], function (p5) { (factory(p5));});
Expand Down Expand Up @@ -1473,7 +1473,7 @@ amplitude = function () {
* }
* function setup() {
* amplitude = new p5.Amplitude();
* sound.loop();
* sound.play();
* }
* function draw() {
* background(0);
Expand All @@ -1482,9 +1482,6 @@ amplitude = function () {
* var size = map(level, 0, 1, 0, 200);
* ellipse(width/2, height/2, size, size);
* }
* function mouseClicked(){
* sound.stop();
* }
* </code></div>
*/
p5.Amplitude = function (smoothing) {
Expand Down
2 changes: 1 addition & 1 deletion lib/p5.sound.min.js

Large diffs are not rendered by default.

11 changes: 4 additions & 7 deletions src/amplitude.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ define(function (require) {
* }
* function setup() {
* amplitude = new p5.Amplitude();
* sound.loop();
* sound.play();
* }
* function draw() {
* background(0);
Expand All @@ -31,9 +31,6 @@ define(function (require) {
* var size = map(level, 0, 1, 0, 200);
* ellipse(width/2, height/2, size, size);
* }
* function mouseClicked(){
* sound.stop();
* }
* </code></div>
*/
p5.Amplitude = function(smoothing) {
Expand Down Expand Up @@ -91,8 +88,8 @@ define(function (require) {
* }
* function setup(){
* amplitude = new p5.Amplitude();
* sound1.loop();
* sound2.loop();
* sound1.play();
* sound2.play();
* amplitude.setInput(sound2);
* }
* function draw() {
Expand Down Expand Up @@ -203,7 +200,7 @@ define(function (require) {
* }
* function setup() {
* amplitude = new p5.Amplitude();
* sound.loop();
* sound.play();
* }
* function draw() {
* background(0);
Expand Down
2 changes: 1 addition & 1 deletion src/delay.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ define(function (require) {
*
* // play the noise with an envelope,
* // a series of fades ( time / value pairs )
* env = new p5.Env(.01, 1, .2, .1);
* env = new p5.Env(.01, 0.2, .2, .1);
* env.play(noise);
* }
* </code></div>
Expand Down
6 changes: 4 additions & 2 deletions src/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,10 @@ define(function (require) {
p5.Env.prototype.dispose = function() {
var now = p5sound.audiocontext.currentTime;
this.disconnect();
this.control.dispose();
this.control = null;
try{
this.control.dispose();
this.control = null;
} catch(e) {}
for (var i = 1; i < this.mathOps.length; i++) {
mathOps[i].dispose();
}
Expand Down
2 changes: 1 addition & 1 deletion src/soundfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ define(function (require) {
* }
*
* function setup() {
* mySound.play();
* mySound.play(0, 0.2, 0.2);
* }
*
* </code></div>
Expand Down

0 comments on commit 63e466f

Please sign in to comment.