Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: use JS global Float32Array constructor instead of non-existent QuickJS API

JS_NewTypedArray and JS_TYPED_ARRAY_FLOAT32 don't exist in QuickJS
2024-01-13. This prevented binary compilation on the oven (and anywhere
without a pre-built cache), which is why --skip-binary was needed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+6 -2
+6 -2
fedac/native/src/js-bindings.c
··· 1222 1222 memcpy(ptr, audio->sample_buf, len * sizeof(float)); 1223 1223 } 1224 1224 1225 - // Create Float32Array view 1226 - JSValue f32 = JS_NewTypedArray(ctx, 1, &ab, JS_TYPED_ARRAY_FLOAT32); 1225 + // Create Float32Array view via global constructor 1226 + JSValue global = JS_GetGlobalObject(ctx); 1227 + JSValue ctor = JS_GetPropertyStr(ctx, global, "Float32Array"); 1228 + JSValue f32 = JS_CallConstructor(ctx, ctor, 1, &ab); 1229 + JS_FreeValue(ctx, ctor); 1230 + JS_FreeValue(ctx, global); 1227 1231 JS_FreeValue(ctx, ab); 1228 1232 return f32; 1229 1233 }