2021-09-29 18:30:42 +00:00
|
|
|
// 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';
|
2021-09-29 18:30:42 +00:00
|
|
|
|
|
|
|
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;
|