Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
billorcutt committed Jan 13, 2019
1 parent f2be13c commit 5b0bd3d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
32 changes: 16 additions & 16 deletions lib/cracked/cracked.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@
selectorType === "type" && node.getType() === match ||
selectorType === "class" && node.getClass() === match ||
selectorType === "id" && node.getID() === match
) {
) {
tmp.push(nodeID);
}
});
Expand Down Expand Up @@ -483,7 +483,7 @@
currNode &&
currNode[paramToRamp] &&
__.isFun(currNode[paramToRamp][rampMethod])
) {
) {
currNode[paramToRamp].cancelScheduledValues(now);
var initialValue = __.ifUndef(initial, currNode[paramToRamp].value),
prevTime = 0;
Expand All @@ -492,7 +492,7 @@
__.isArr(target) &&
__.isArr(time) &&
target.length === time.length
) {
) {
for (var i = 0; i < target.length; i++) {
prevTime = __.isUndef(time[i - 1]) ? 0 : (time[i - 1] + prevTime);
logToConsole(" target " + target[i] + " time " + (_context.currentTime + prevTime + time[i]) + " current time " + (_context.currentTime));
Expand Down Expand Up @@ -696,7 +696,7 @@
this.isModulator = function () {
if (
this.getMacroContainerUUID() && !!getNodeWithUUID(this.getMacroContainerUUID()).getParams().settings.modulates
) {
) {
return true;
} else {
return !!this.getParams().settings.modulates;
Expand All @@ -708,7 +708,7 @@
if (
this.isModulator() &&
this.getMacroContainerUUID() && !!getNodeWithUUID(this.getMacroContainerUUID()).getParams().settings.modulates
) {
) {
return getNodeWithUUID(this.getMacroContainerUUID()).getParams().settings.modulates;
} else if (this.isModulator()) {
return this.getParams().settings.modulates;
Expand Down Expand Up @@ -868,7 +868,7 @@
fromNode &&
fromNode.isModulator() &&
toNode && !fromNode.areSiblings(toNode)
) {
) {
return {
"from": getNodeToConnect(fromNode, "from"),
"to": getNodeToConnectToModulator(toNode, fromNode.isModulatorType())
Expand Down Expand Up @@ -1121,8 +1121,8 @@
var mappingResult = resolveParamMapping(keyStr, map),
keyArr = mappingResult.path.split("."),
keyFunc = mappingResult.fn || function (val) {
return val;
};
return val;
};
for (var i = 0; i < keyArr.length; i++) {
if ((i + 1) < keyArr.length && __.isNotUndef(node[keyArr[i]])) {
if (node[keyArr[i]].constructor.name === "AudioParam") {
Expand Down Expand Up @@ -1559,9 +1559,9 @@
//make the real mediastream and drop it into place.
var newNode = null;
navigator.getUserMedia = (navigator.getUserMedia ||
navigator.webkitGetUserMedia ||
navigator.mozGetUserMedia ||
navigator.msGetUserMedia);
navigator.webkitGetUserMedia ||
navigator.mozGetUserMedia ||
navigator.msGetUserMedia);

if(navigator.getUserMedia) {
navigator.getUserMedia(
Expand Down Expand Up @@ -2118,7 +2118,7 @@
} else if (
uuid && __.isObj(uuid) &&
uuid.constructor.name === "AudioNode"
) {
) {
//its already an audio node so just return it
return uuid;
//its the raw node so fetch the wrapper and return it
Expand Down Expand Up @@ -2147,7 +2147,7 @@
getSelectorType(currSelector) === "id" &&
__.isArr(tmp) &&
tmp.length > 1
) ? [tmp[0]] : tmp;
) ? [tmp[0]] : tmp;
//dedupe
nodes = arrayUnique(nodes.concat(tmp));
}
Expand Down Expand Up @@ -2228,7 +2228,7 @@
if (
recordingMacro() &&
getCurrentMacro().getType() === name
) {
) {
getCurrentMacro().setMacroNameSpace(getCurrentMacroNamespace());
_currentMacro.pop();
}
Expand Down Expand Up @@ -3750,8 +3750,8 @@
options = options || {};

options = __.isNum(options) ||
__.isArr(options) ||
__.isStr(options) ? {envelope: options} : options;
__.isArr(options) ||
__.isStr(options) ? {envelope: options} : options;

__.begin("adsr", options).gain({

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "cracked",
"productName": "Cracked",
"version": "0.2.10",
"version": "0.2.11",
"main": "main.js",
"description": "Web audio, cracked.",
"keywords": "Web audio, synthesis, sound, music",
Expand Down

0 comments on commit 5b0bd3d

Please sign in to comment.