mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-11 05:38:34 +00:00
rm deadcode
This commit is contained in:
parent
344d9ca1a8
commit
b1090a1dd8
@ -105,26 +105,6 @@ export const getAudioDevices = async () => {
|
|||||||
return devicesMap;
|
return devicesMap;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const setAudioDevice = async (id) => {
|
|
||||||
let audioCtx = getAudioContext();
|
|
||||||
if (audioCtx.sinkId === id) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
await audioCtx.suspend();
|
|
||||||
await audioCtx.close();
|
|
||||||
audioCtx = setDefaultAudioContext();
|
|
||||||
await audioCtx.resume();
|
|
||||||
const isValidID = (id ?? '').length > 0;
|
|
||||||
if (isValidID) {
|
|
||||||
try {
|
|
||||||
await audioCtx.setSinkId(id);
|
|
||||||
} catch {
|
|
||||||
logger('failed to set audio interface', 'warning');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
initializeAudioOutput();
|
|
||||||
};
|
|
||||||
|
|
||||||
const defaultDefaultValues = {
|
const defaultDefaultValues = {
|
||||||
s: 'triangle',
|
s: 'triangle',
|
||||||
gain: 0.8,
|
gain: 0.8,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user