Skip to content

Commit d7e40b7

Browse files
committed
Code golf
1 parent 1af27ca commit d7e40b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/libwebaudio.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ var LibraryWebAudio = {
9898
// AUDIO_CONTEXT_RENDER_SIZE_DEFAULT and AUDIO_CONTEXT_RENDER_SIZE_HARDWARE
9999
// into their AudioContextRenderSizeCategory enum, or take the positive int.
100100
function readRenderSizeHint(val) {
101-
return (val == 0) ? "default" : ((val < 0) ? "hardware" : val);
101+
return (val < 0) ? 'hardware' : (val || 'default');
102102
}
103103
var opts = options ? {
104104
latencyHint: UTF8ToString({{{ makeGetValue('options', C_STRUCTS.EmscriptenWebAudioCreateAttributes.latencyHint, '*') }}}) || undefined,

0 commit comments

Comments
 (0)