feat: add menu bar app and bundle script

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-01 09:50:14 +02:00
co-authored by Claude Sonnet 5.5
parent ee8d56c2fb
commit 835b8bb46b
6 changed files with 180 additions and 1 deletions
+7 -1
View File
@@ -31,6 +31,7 @@ public final class AudioRecorder: AudioRecording {
}
let ratio = targetFormat.sampleRate / inputFormat.sampleRate
input.removeTap(onBus: 0)
input.installTap(onBus: 0, bufferSize: 4096, format: inputFormat) { [weak self] pcm, _ in
guard let self else { return }
let capacity = AVAudioFrameCount(Double(pcm.frameLength) * ratio) + 1
@@ -52,7 +53,12 @@ public final class AudioRecorder: AudioRecording {
self.lock.withLock { self.buffer.append(contentsOf: samples) }
}
engine.prepare()
try engine.start()
do {
try engine.start()
} catch {
input.removeTap(onBus: 0)
throw error
}
}
public func stop() -> [Float] {