hotfix: fix scope and friends #1847
This commit is contained in:
parent
1935195e9a
commit
30fe5b47e3
1 changed files with 3 additions and 1 deletions
|
|
@ -359,7 +359,9 @@ export let analysers = {},
|
||||||
analysersData = {};
|
analysersData = {};
|
||||||
|
|
||||||
export function getAnalyserById(id, fftSize = 1024, smoothingTimeConstant = 0.5) {
|
export function getAnalyserById(id, fftSize = 1024, smoothingTimeConstant = 0.5) {
|
||||||
if (!analysers[id] || analysers[id].audioContext != getAudioContext()) {
|
// below commented out branch is hotfixing https://codeberg.org/uzu/strudel/issues/1847
|
||||||
|
// might cause conflicts with exporting...
|
||||||
|
if (!analysers[id] /* || analysers[id].audioContext != getAudioContext() */) {
|
||||||
// make sure this doesn't happen too often as it piles up garbage
|
// make sure this doesn't happen too often as it piles up garbage
|
||||||
const analyserNode = getAudioContext().createAnalyser();
|
const analyserNode = getAudioContext().createAnalyser();
|
||||||
analyserNode.fftSize = fftSize;
|
analyserNode.fftSize = fftSize;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue