This commit is contained in:
2026-01-23 09:25:22 -06:00
parent 5f9c74a493
commit cf82b82993

View File

@@ -171,7 +171,10 @@ JSC_CCALL(samplerate_new_resampler,
r->state = state;
r->channels = channels;
return Resampler2js(js, r);
JSValue resampler = Resampler2js(js, r);
JS_SetPropertyStr(js, resampler, "channels", JS_NewInt32(js, channels));
return resampler;
)
// resampler.process(blob, ratio, end_of_input?)
@@ -272,7 +275,6 @@ static const JSCFunctionListEntry js_Resampler_funcs[] = {
JS_CFUNC_DEF("process", 3, js_resampler_process),
JS_CFUNC_DEF("reset", 0, js_resampler_reset),
JS_CFUNC_DEF("set_ratio", 1, js_resampler_set_ratio),
JS_CGETSET_DEF("channels", js_resampler_get_channels, NULL),
};
static const JSCFunctionListEntry js_samplerate_funcs[] = {