mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-11 21:58:31 +00:00
16 lines
618 B
JavaScript
16 lines
618 B
JavaScript
import React from 'react';
|
|
import { audioEngineTargets } from '../../../settings.mjs';
|
|
import { SelectInput } from './SelectInput';
|
|
|
|
// Allows the user to select an audio interface for Strudel to play through
|
|
export function AudioEngineTargetSelector({ target, onChange, isDisabled }) {
|
|
const onTargetChange = (target) => {
|
|
onChange(target);
|
|
};
|
|
const options = new Map([
|
|
[audioEngineTargets.webaudio, audioEngineTargets.webaudio ],
|
|
[audioEngineTargets.superdirt, 'superdirt (osc)'],
|
|
]);
|
|
return <SelectInput isDisabled={isDisabled} options={options} value={target} onChange={onTargetChange} />;
|
|
}
|