signal-desktop/ts/calling/audioDeviceModule.ts

19 lines
495 B
TypeScript
Raw Normal View History

// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { makeEnumParser } from '../util/enum';
2021-11-04 21:50:34 +00:00
import * as OS from '../OS';
export enum AudioDeviceModule {
Default = 'Default',
WindowsAdm2 = 'WindowsAdm2',
}
export const parseAudioDeviceModule = makeEnumParser(
AudioDeviceModule,
AudioDeviceModule.Default
);
2021-11-04 21:50:34 +00:00
2021-12-14 19:24:43 +00:00
export const getAudioDeviceModule = (): AudioDeviceModule =>
OS.isWindows() ? AudioDeviceModule.WindowsAdm2 : AudioDeviceModule.Default;