Finish deprecation of legacy windows audio device module
This commit is contained in:
parent
3eb0e30a23
commit
4ae402eb7f
3 changed files with 1 additions and 59 deletions
|
@ -1,18 +0,0 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { makeEnumParser } from '../util/enum';
|
||||
import OS from '../util/os/osMain';
|
||||
|
||||
export enum AudioDeviceModule {
|
||||
Default = 'Default',
|
||||
WindowsAdm2 = 'WindowsAdm2',
|
||||
}
|
||||
|
||||
export const parseAudioDeviceModule = makeEnumParser(
|
||||
AudioDeviceModule,
|
||||
AudioDeviceModule.Default
|
||||
);
|
||||
|
||||
export const getAudioDeviceModule = (): AudioDeviceModule =>
|
||||
OS.isWindows() ? AudioDeviceModule.WindowsAdm2 : AudioDeviceModule.Default;
|
|
@ -1,39 +0,0 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { assert } from 'chai';
|
||||
import * as sinon from 'sinon';
|
||||
|
||||
import {
|
||||
AudioDeviceModule,
|
||||
getAudioDeviceModule,
|
||||
} from '../../calling/audioDeviceModule';
|
||||
|
||||
describe('audio device module', () => {
|
||||
describe('getAudioDeviceModule', () => {
|
||||
let sandbox: sinon.SinonSandbox;
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.createSandbox();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
sandbox.restore();
|
||||
});
|
||||
|
||||
it('returns ADM2 on Windows', () => {
|
||||
sandbox.stub(process, 'platform').get(() => 'win32');
|
||||
assert.strictEqual(getAudioDeviceModule(), AudioDeviceModule.WindowsAdm2);
|
||||
});
|
||||
|
||||
it('returns the default module on macOS', () => {
|
||||
sandbox.stub(process, 'platform').get(() => 'darwin');
|
||||
assert.strictEqual(getAudioDeviceModule(), AudioDeviceModule.Default);
|
||||
});
|
||||
|
||||
it('returns the default module on Linux', () => {
|
||||
sandbox.stub(process, 'platform').get(() => 'linux');
|
||||
assert.strictEqual(getAudioDeviceModule(), AudioDeviceModule.Default);
|
||||
});
|
||||
});
|
||||
});
|
3
ts/types/Storage.d.ts
vendored
3
ts/types/Storage.d.ts
vendored
|
@ -6,7 +6,6 @@ import type {
|
|||
CustomColorsItemType,
|
||||
DefaultConversationColorType,
|
||||
} from './Colors';
|
||||
import type { AudioDeviceModule } from '../calling/audioDeviceModule';
|
||||
import type { PhoneNumberDiscoverability } from '../util/phoneNumberDiscoverability';
|
||||
import type { PhoneNumberSharingMode } from '../util/phoneNumberSharingMode';
|
||||
import type { RetryItemType } from '../util/retryPlaceholders';
|
||||
|
@ -170,7 +169,7 @@ export type StorageAccessType = {
|
|||
// Deprecated
|
||||
'challenge:retry-message-ids': never;
|
||||
nextSignedKeyRotationTime: number;
|
||||
previousAudioDeviceModule: AudioDeviceModule;
|
||||
previousAudioDeviceModule: never;
|
||||
senderCertificateWithUuid: never;
|
||||
signaling_key: never;
|
||||
signedKeyRotationRejected: number;
|
||||
|
|
Loading…
Add table
Reference in a new issue