mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-11 21:58:31 +00:00
comments
This commit is contained in:
parent
89fe0f11ae
commit
ec44103d20
@ -82,7 +82,7 @@ let delays = {};
|
||||
const maxfeedback = 0.98;
|
||||
|
||||
let channelMerger, destinationGain;
|
||||
|
||||
//update the output channel configuration to match user's audio device
|
||||
export function initializeAudioOutput() {
|
||||
const audioContext = getAudioContext();
|
||||
const maxChannelCount = audioContext.destination.maxChannelCount;
|
||||
|
||||
@ -3,6 +3,7 @@ import { getAudioContext, initializeAudioOutput } from '@strudel.cycles/webaudio
|
||||
import { SelectInput } from './SelectInput';
|
||||
|
||||
const initdevices = new Map();
|
||||
// Allows the user to select an audio interface for Strudel to play through
|
||||
export function AudioDeviceSelector({ audioDeviceName, onChange }) {
|
||||
const [devices, setDevices] = useState(initdevices);
|
||||
const devicesInitialized = devices.size > 0;
|
||||
@ -24,6 +25,7 @@ export function AudioDeviceSelector({ audioDeviceName, onChange }) {
|
||||
return devicesMap;
|
||||
}, []);
|
||||
|
||||
// on first load, check if there is a cached audio device name in settings and initialize it
|
||||
useEffect(() => {
|
||||
if (!audioDeviceName.length || devicesInitialized) {
|
||||
return;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user