Browse files

Rename error variables

  • Loading branch information...
1 parent a307a23 commit 54cf5524d8a2a39eeeb4de069abd65ee0f5cc7e8 @gmarty committed Apr 18, 2012
Showing with 9 additions and 9 deletions.
  1. +7 −7 XAudioServer.js
  2. +2 −2 resampler.js
View
14 XAudioServer.js
@@ -209,15 +209,15 @@ XAudioServer.prototype.initializeAudio = function() {
}
this.initializeMozAudio();
}
- catch (error) {
+ catch (error1) {
try {
this.initializeWebAudio();
}
- catch (error) {
+ catch (error2) {
try {
this.initializeFlashAudio();
}
- catch (error) {
+ catch (error3) {
throw (new Error('Browser does not support real time audio output.'));
}
}
@@ -539,13 +539,13 @@ function getBufferSamples() {
try {
return audioContextSampleBuffer.subarray(0, audioBufferSize);
}
- catch (error) {
+ catch (error1) {
try {
//Regular array pass:
audioContextSampleBuffer.length = audioBufferSize;
return audioContextSampleBuffer;
}
- catch (error) {
+ catch (error2) {
//Nightly Firefox 4 used to have the subarray function named as slice:
return audioContextSampleBuffer.slice(0, audioBufferSize);
}
@@ -587,11 +587,11 @@ function resetCallbackAPIAudioBuffer(APISampleRate, bufferAlloc) {
try {
audioContextHandle = new webkitAudioContext(); //Create a system audio context.
}
- catch (error) {
+ catch (error1) {
try {
audioContextHandle = new AudioContext(); //Create a system audio context.
}
- catch (error) {
+ catch (error2) {
return;
}
}
View
4 resampler.js
@@ -145,13 +145,13 @@ Resampler.prototype.bufferSlice = function(sliceAmount) {
try {
return this.outputBuffer.subarray(0, sliceAmount);
}
- catch (error) {
+ catch (error1) {
try {
//Regular array pass:
this.outputBuffer.length = sliceAmount;
return this.outputBuffer;
}
- catch (error) {
+ catch (error2) {
//Nightly Firefox 4 used to have the subarray function named as slice:
return this.outputBuffer.slice(0, sliceAmount);
}

0 comments on commit 54cf552

Please sign in to comment.