mirror of
https://github.com/Boof2015/prism.git
synced 2026-08-21 04:49:52 +02:00
native macos backend, reduce latency
This commit is contained in:
@@ -13,6 +13,9 @@ export interface CaptureSourceDescriptor {
|
||||
id: string
|
||||
label: string
|
||||
kind: CaptureMode
|
||||
isDefault?: boolean
|
||||
sampleRate?: number
|
||||
channelCount?: number
|
||||
}
|
||||
|
||||
export interface CaptureBackendSupportEntry {
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
export interface NativeMacOSCaptureSupport {
|
||||
available: boolean
|
||||
reason: string | null
|
||||
}
|
||||
|
||||
export interface NativeMacOSCaptureSource {
|
||||
id: string
|
||||
label: string
|
||||
kind: 'system'
|
||||
isDefault: boolean
|
||||
sampleRate: number
|
||||
channelCount: number
|
||||
}
|
||||
|
||||
export interface NativeMacOSCaptureStartResult {
|
||||
sampleRate: number
|
||||
channelCount: number
|
||||
deviceId: string
|
||||
deviceLabel: string
|
||||
}
|
||||
|
||||
export interface NativeMacOSCapturedChunk {
|
||||
left: Float32Array
|
||||
right: Float32Array
|
||||
channelCount: number
|
||||
capturedAtMilliseconds: number
|
||||
sequence: number
|
||||
}
|
||||
|
||||
export interface NativeMacOSCaptureDrainResult {
|
||||
chunks: NativeMacOSCapturedChunk[]
|
||||
overwriteCount: number
|
||||
queueDepth: number
|
||||
}
|
||||
|
||||
export interface NativeMacOSCaptureAPI {
|
||||
getSupport: () => NativeMacOSCaptureSupport
|
||||
listOutputDevices: () => NativeMacOSCaptureSource[]
|
||||
start: (deviceId?: string) => NativeMacOSCaptureStartResult
|
||||
stop: () => void
|
||||
drain: (maxChunks?: number) => NativeMacOSCaptureDrainResult
|
||||
nowMilliseconds: () => number
|
||||
}
|
||||
|
||||
export interface NativeCaptureAPI {
|
||||
macosCapture: NativeMacOSCaptureAPI
|
||||
}
|
||||
Reference in New Issue
Block a user