Use errorLogger instead

This commit is contained in:
Nikita 2025-10-22 23:09:30 +03:00
parent 5a70599aac
commit 16f885c010

View file

@ -17,6 +17,7 @@ import {
setMaxPolyphony, setMaxPolyphony,
setMultiChannelOrbits, setMultiChannelOrbits,
resetGlobalEffects, resetGlobalEffects,
errorLogger,
} from 'superdough'; } from 'superdough';
import './supradough.mjs'; import './supradough.mjs';
import { workletUrl } from 'supradough'; import { workletUrl } from 'supradough';
@ -62,8 +63,8 @@ export async function renderPatternAudio(pattern, cps, begin, end, sampleRate, d
cps, cps,
hap.whole?.begin.valueOf(), hap.whole?.begin.valueOf(),
); );
} catch (error) { } catch (err) {
logger("[webaudio] An error had occured while calling superdough. Skipping hap.") errorLogger(err, 'webaudio')
} }
} }
}), }),
@ -85,12 +86,12 @@ export async function renderPatternAudio(pattern, cps, begin, end, sampleRate, d
document.body.removeChild(a); document.body.removeChild(a);
URL.revokeObjectURL(url); URL.revokeObjectURL(url);
}) })
// .finally(async () => { .finally(async () => {
// setAudioContext(null); setAudioContext(null);
// setSuperdoughAudioController(null); setSuperdoughAudioController(null);
// resetGlobalEffects(); resetGlobalEffects();
// await initAudio(); await initAudio();
// }); });
} }
export function webaudioRepl(options = {}) { export function webaudioRepl(options = {}) {