- RevueSDK
- MicrophoneCapturer
Class
MicrophoneCapturer
麥克風擷取器 — 對外介面(薄殼,conform AudioCapturer protocol)
class MicrophoneCapturerOverview
對齊 CameraCapturer / InternalCameraCapturer 兩層結構:對外殼住 Capture/、 內部硬體模組住 Internal/Media/。讓 protocol 演化(output / startCapture async 等)不污染受保護的內部模組。
透過 LocalAudioTrack.capturer as? MicrophoneCapturer 取得(麥克風 track)。
localParticipant.setMicrophone(enabled: true) // 內部會把對外殼塞進 track.capturer
singleton 設計:iOS AVAudioEngine input 全 process 唯一限制決定的—— 多個 LocalAudioTrack 共享同一條 PCM 來源。對應視訊側「相機可多支共存」的設計 差異,是物理硬體性質、非設計缺陷(見 MCU spec 設計討論)。
Topics
Instance Properties
var captureState: CaptureState擷取器狀態(從內部 audioEngine isRunning 推導)
Instance Methods
func startCapture() async throws啟動擷取(包裝內部 sync
start()為 protocol 要求的 async)func stopCapture() async throws停止擷取(包裝內部 sync
stop()為 protocol 要求的 async)