mirror of
https://github.com/eliasstepanik/strudel.git
synced 2026-01-10 21:28:31 +00:00
rm dependency
This commit is contained in:
parent
9e233fe587
commit
a32bb58fb3
@ -15,7 +15,7 @@ import { logger } from './logger.mjs';
|
||||
import { loadBuffer } from './sampler.mjs';
|
||||
|
||||
export const DEFAULT_MAX_POLYPHONY = 128;
|
||||
export const DEFAULT_AUDIO_DEVICE_NAME = 'System Standard';
|
||||
const DEFAULT_AUDIO_DEVICE_NAME = 'System Standard';
|
||||
|
||||
let maxPolyphony = DEFAULT_MAX_POLYPHONY;
|
||||
export function setMaxPolyphony(polyphony) {
|
||||
@ -184,7 +184,7 @@ function loadWorklets() {
|
||||
|
||||
// this function should be called on first user interaction (to avoid console warning)
|
||||
export async function initAudio(options = {}) {
|
||||
const { disableWorklets = false, maxPolyphony, audioDeviceName } = options;
|
||||
const { disableWorklets = false, maxPolyphony, audioDeviceName = DEFAULT_AUDIO_DEVICE_NAME } = options;
|
||||
setMaxPolyphony(maxPolyphony);
|
||||
if (typeof window === 'undefined') {
|
||||
return;
|
||||
|
||||
@ -2,7 +2,6 @@ import { persistentMap } from '@nanostores/persistent';
|
||||
import { useStore } from '@nanostores/react';
|
||||
import { register } from '@strudel/core';
|
||||
import { isUdels } from './repl/util.mjs';
|
||||
import { DEFAULT_AUDIO_DEVICE_NAME } from '@strudel/webaudio';
|
||||
|
||||
export const audioEngineTargets = {
|
||||
webaudio: 'webaudio',
|
||||
@ -35,7 +34,6 @@ export const defaultSettings = {
|
||||
isPanelOpen: true,
|
||||
togglePanelTrigger: 'click', //click | hover
|
||||
userPatterns: '{}',
|
||||
audioDeviceName: DEFAULT_AUDIO_DEVICE_NAME,
|
||||
audioEngineTarget: audioEngineTargets.webaudio,
|
||||
isButtonRowHidden: false,
|
||||
isCSSAnimationDisabled: false,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user