Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib-minified/WebAudioRecorder.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions lib-minified/WebAudioRecorderMp3.min.js

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions lib-minified/WebAudioRecorderOgg.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib-minified/WebAudioRecorderWav.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/WebAudioRecorderMp3.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function record(buffer) {
if (bufferCount++ < maxBuffers)
if (encoder)
encoder.encode(buffer);
else
else if (recBuffers)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix is wrong. You need to wrap the top level condition with brackets otherwise you will trigger a timeout with the following else.

    if (bufferCount++ < maxBuffers) {
        if (encoder)
            encoder.encode(buffer);
        else if (recBuffers)
            recBuffers.push(buffer);
    } else
        self.postMessage({ command: "timeout" });

recBuffers.push(buffer);
else
self.postMessage({ command: "timeout" });
Expand Down