native first
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import Foundation
|
||||
|
||||
public enum AudioSource: String, Equatable {
|
||||
case microphone
|
||||
case system
|
||||
}
|
||||
|
||||
public struct PCMFrame: Equatable {
|
||||
public let source: AudioSource
|
||||
public let sampleRate: Int
|
||||
public let channels: Int
|
||||
public let pcmS16LE: Data
|
||||
public let timestamp: Date
|
||||
|
||||
public init(source: AudioSource, sampleRate: Int, channels: Int, pcmS16LE: Data, timestamp: Date = Date()) {
|
||||
self.source = source
|
||||
self.sampleRate = sampleRate
|
||||
self.channels = channels
|
||||
self.pcmS16LE = pcmS16LE
|
||||
self.timestamp = timestamp
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user