Skip to content

Commit e455f22

Browse files
committed
Removed superfluous 'console' + rebaseline
1 parent d7e40b7 commit e455f22

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/audio_worklet.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function createWasmAudioWorkletProcessor() {
5050
// 64 frames, for the case where a multi-MB stack is passed.
5151
this.outputViews = new Array(Math.min(((wwParams.stackSize - {{{ STACK_ALIGN }}}) / this.bytesPerChannel) | 0, /*sensible limit*/ 64));
5252
#if ASSERTIONS
53-
console.assert(this.outputViews.length > 0, `AudioWorklet needs more stack allocating (at least ${this.bytesPerChannel})`);
53+
assert(this.outputViews.length > 0, `AudioWorklet needs more stack allocating (at least ${this.bytesPerChannel})`);
5454
#endif
5555
this.createOutputViews();
5656

@@ -138,8 +138,8 @@ function createWasmAudioWorkletProcessor() {
138138
#endif
139139
var oldStackPtr = stackSave();
140140
#if ASSERTIONS
141-
console.assert(oldStackPtr == this.ctorOldStackPtr, 'AudioWorklet stack address has unexpectedly moved');
142-
console.assert(outputViewsNeeded <= this.outputViews.length, `Too many AudioWorklet outputs (need ${outputViewsNeeded} but have stack space for ${this.outputViews.length})`);
141+
assert(oldStackPtr == this.ctorOldStackPtr, 'AudioWorklet stack address has unexpectedly moved');
142+
assert(outputViewsNeeded <= this.outputViews.length, `Too many AudioWorklet outputs (need ${outputViewsNeeded} but have stack space for ${this.outputViews.length})`);
143143
#endif
144144

145145
// Allocate the necessary stack space. All pointer variables are in bytes;
@@ -156,7 +156,7 @@ function createWasmAudioWorkletProcessor() {
156156
var dataPtr = structPtr + (stackMemoryAligned - stackMemoryData);
157157
#if ASSERTIONS
158158
// TODO: look at why stackAlloc isn't tripping the assertions
159-
console.assert(stackMemoryAligned <= wwParams.stackSize, `Not enough stack allocated to the AudioWorklet (need ${stackMemoryAligned}, got ${wwParams.stackSize})`);
159+
assert(stackMemoryAligned <= wwParams.stackSize, `Not enough stack allocated to the AudioWorklet (need ${stackMemoryAligned}, got ${wwParams.stackSize})`);
160160
#endif
161161

162162
// Copy input audio descriptor structs and data to Wasm (recall, structs
@@ -225,7 +225,7 @@ function createWasmAudioWorkletProcessor() {
225225
// And that the views' size match the passed in output buffers
226226
for (entry of outputList) {
227227
for (subentry of entry) {
228-
console.assert(subentry.byteLength == this.bytesPerChannel, `AudioWorklet unexpected output buffer size (expected ${this.bytesPerChannel} got ${subentry.byteLength})`);
228+
assert(subentry.byteLength == this.bytesPerChannel, `AudioWorklet unexpected output buffer size (expected ${this.bytesPerChannel} got ${subentry.byteLength})`);
229229
}
230230
}
231231
}

test/codesize/audio_worklet_wasm.expected.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ var K = [], L = a => {
134134
a = {
135135
latencyHint: c,
136136
sampleRate: G[a + 4 >> 2] || void 0,
137-
N: 0 == b ? "default" : 0 > b ? "hardware" : b
137+
N: 0 > b ? "hardware" : b || "default"
138138
};
139139
} else a = void 0;
140140
a = new AudioContext(a);
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"a.html": 519,
33
"a.html.gz": 357,
4-
"a.js": 4313,
5-
"a.js.gz": 2222,
4+
"a.js": 4309,
5+
"a.js.gz": 2219,
66
"a.wasm": 1329,
77
"a.wasm.gz": 895,
8-
"total": 6161,
9-
"total_gz": 3474
8+
"total": 6157,
9+
"total_gz": 3471
1010
}

0 commit comments

Comments
 (0)