Created
March 12, 2011 04:46
-
-
Save notmasteryet/867036 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/Audiolet.js 2011-03-11 22:44:58.856274000 -0600 | |
+++ b/Audiolet.js 2011-03-11 22:44:02.196274002 -0600 | |
@@ -213,16 +213,17 @@ | |
}, | |
tick: function() { | |
var outputPosition = this.output.mozCurrentSampleOffset(); | |
// Check if some data was not written in previous attempts | |
var numSamplesWritten; | |
if (this.overflow) { | |
numSamplesWritten = this.output.mozWriteAudio(this.overflow); | |
+ if(numSamplesWritten === 0) return; | |
this.writePosition += numSamplesWritten; | |
if (numSamplesWritten < this.overflow.length) { | |
// Not all the data was written, saving the tail for writing | |
// the next time fillBuffer is called | |
this.overflow = this.overflow.subarray(numSamplesWritten); | |
return; | |
} | |
this.overflow = null; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment