fd7e1a5907
AudioRecorder captures system audio (ScreenCaptureKit) + mic (AVAudioEngine) on a single serial ioQueue, one shared monotonic t0, time-driven writers (pad gaps / trim overlaps) so tracks stay aligned, and an energy mic-VAD for 'self' spans. AudioMixer sums the aligned tracks into mixed_mono_16k.wav. SessionController drives a serialized start/stop state machine, writes the session folder + self_vad.json, exposes live level meters, and finalizes on quit. Hardening from review: ioQueue single-domain (no races), stop() never hangs (mic-first teardown + bounded stopCapture), layout-agnostic mic deep-copy, discard-only video output to keep SCStream alive, VAD lockstep on committed frames, stable signing team in project.yml, single-instance enforcement.
37 lines
1.3 KiB
Swift
37 lines
1.3 KiB
Swift
import SwiftUI
|
|
|
|
/// Menu-bar-only app entry point.
|
|
///
|
|
/// `LSUIElement` (set in Info.plist) keeps the app out of the Dock; the
|
|
/// `MenuBarExtra` scene provides the status-bar item and its panel. Phase 0 only
|
|
/// wires up permissions, settings, and a backend health check — no audio,
|
|
/// capture, or call detection yet.
|
|
@main
|
|
struct Ten31TranscriptsApp: App {
|
|
@NSApplicationDelegateAdaptor(AppDelegate.self) private var appDelegate
|
|
|
|
@StateObject private var settings: AppSettings
|
|
@StateObject private var permissions = PermissionsManager()
|
|
@StateObject private var health = SparkControlHealth()
|
|
@StateObject private var session: SessionController
|
|
|
|
init() {
|
|
let settings = AppSettings()
|
|
_settings = StateObject(wrappedValue: settings)
|
|
_session = StateObject(wrappedValue: SessionController(settings: settings))
|
|
}
|
|
|
|
var body: some Scene {
|
|
MenuBarExtra {
|
|
MenuBarView()
|
|
.environmentObject(settings)
|
|
.environmentObject(permissions)
|
|
.environmentObject(health)
|
|
.environmentObject(session)
|
|
} label: {
|
|
Image(systemName: session.state == .recording ? "waveform.circle.fill" : "waveform.circle")
|
|
}
|
|
.menuBarExtraStyle(.window)
|
|
}
|
|
}
|