@4players/odin-plugin-web 1.0.0-alpha.8 → 1.0.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/plugin/audioController.d.ts +8 -3
- package/lib/plugin/audioController.js +52 -6
- package/lib/plugin/config.d.ts +0 -1
- package/lib/plugin/config.js +0 -1
- package/lib/plugin/connectionPool.d.ts +0 -1
- package/lib/plugin/connectionPool.js +0 -1
- package/lib/plugin/index.d.ts +0 -1
- package/lib/plugin/index.js +0 -1
- package/lib/plugin/mainConnection.d.ts +0 -1
- package/lib/plugin/mainConnection.js +0 -1
- package/lib/plugin/roomConnection.d.ts +0 -1
- package/lib/plugin/roomConnection.js +10 -6
- package/lib/plugin/rpcConnection.d.ts +0 -1
- package/lib/plugin/rpcConnection.js +0 -1
- package/lib/plugin/token.d.ts +2 -1
- package/lib/plugin/token.js +12 -1
- package/lib/worker/buffers.d.ts +42 -0
- package/lib/worker/buffers.js +79 -0
- package/lib/worker/common.d.ts +44 -27
- package/lib/worker/common.js +2 -95
- package/lib/worker/config.d.ts +8 -0
- package/lib/worker/config.js +11 -0
- package/lib/worker/index.d.ts +1 -45
- package/lib/worker/index.js +1 -2
- package/lib/worker/memory.d.ts +9 -0
- package/lib/worker/memory.js +29 -0
- package/lib/worker/messages.d.ts +0 -80
- package/lib/worker/messages.js +0 -1
- package/lib/worker/packet.d.ts +11 -0
- package/lib/worker/packet.js +59 -0
- package/lib/worker/shared/capture.d.ts +28 -0
- package/lib/worker/shared/capture.js +63 -0
- package/lib/worker/shared/index.d.ts +3 -0
- package/lib/worker/shared/index.js +148 -0
- package/lib/worker/shared/messages.d.ts +67 -0
- package/lib/worker/shared/messages.js +64 -0
- package/lib/worker/shared/playback.d.ts +21 -0
- package/lib/worker/shared/playback.js +78 -0
- package/lib/worker/unshared/capture.d.ts +28 -0
- package/lib/worker/unshared/capture.js +66 -0
- package/lib/worker/unshared/index.d.ts +3 -0
- package/lib/worker/unshared/index.js +171 -0
- package/lib/worker/unshared/messages.d.ts +81 -0
- package/lib/worker/unshared/messages.js +80 -0
- package/lib/worker/unshared/playback.d.ts +23 -0
- package/lib/worker/unshared/playback.js +83 -0
- package/package.json +15 -11
- package/lib/wasm/index.js +0 -19
package/lib/worker/index.d.ts
CHANGED
|
@@ -1,47 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export interface Activity {
|
|
3
|
-
isSilent: boolean;
|
|
4
|
-
rmsDBFS: number;
|
|
5
|
-
}
|
|
6
|
-
export declare const silence: Activity;
|
|
7
|
-
export interface VadConfig {
|
|
8
|
-
volumeGate?: {
|
|
9
|
-
attackThreshold: number;
|
|
10
|
-
releaseThreshold: number;
|
|
11
|
-
};
|
|
12
|
-
voiceActivity?: {
|
|
13
|
-
attackThreshold: number;
|
|
14
|
-
releaseThreshold: number;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
export interface CaptureWorker {
|
|
18
|
-
readonly worklet: AudioWorkletNode;
|
|
19
|
-
readonly worker: Worker;
|
|
20
|
-
get context(): BaseAudioContext;
|
|
21
|
-
get activity(): Activity;
|
|
22
|
-
get speechProbability(): number;
|
|
23
|
-
setMedias(connections: Array<{
|
|
24
|
-
id: number;
|
|
25
|
-
mediaIds: number[];
|
|
26
|
-
}>): void;
|
|
27
|
-
setVolume(value: number): void;
|
|
28
|
-
setVad(config: VadConfig): void;
|
|
29
|
-
close(): void;
|
|
30
|
-
}
|
|
1
|
+
import { CaptureSink, CaptureWorker, PlaybackWorker } from './common';
|
|
31
2
|
export declare function createCaptureWorker(context: AudioContext, sink: CaptureSink, refreshRate?: number): Promise<CaptureWorker>;
|
|
32
|
-
export interface PlaybackId {
|
|
33
|
-
connectionId: number;
|
|
34
|
-
mediaId: number;
|
|
35
|
-
}
|
|
36
|
-
export interface PlaybackWorker {
|
|
37
|
-
readonly audioContext: AudioContext;
|
|
38
|
-
receivePacket(connectionId: number, packet: Uint8Array): void;
|
|
39
|
-
addMedias(connectionId: number, mediaIds: number[]): void;
|
|
40
|
-
removeMedias(connectionId: number, mediaIds: number[]): void;
|
|
41
|
-
getActivity(id: PlaybackId): Activity | undefined;
|
|
42
|
-
setGlobalVolume(value: number): void;
|
|
43
|
-
setVolume(id: PlaybackId, value: number): void;
|
|
44
|
-
close(): void;
|
|
45
|
-
}
|
|
46
3
|
export declare function createPlaybackWorker(audioContext: AudioContext, refreshRate?: number): Promise<PlaybackWorker>;
|
|
47
|
-
//# sourceMappingURL=index.d.ts.map
|