Skip to content

Commit

Permalink
Rename error variables
Browse files Browse the repository at this point in the history
  • Loading branch information
gmarty committed Apr 18, 2012
1 parent a307a23 commit 54cf552
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions XAudioServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.'));
}
}
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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;
}
}
Expand Down
4 changes: 2 additions & 2 deletions resampler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 54cf552

Please sign in to comment.