Fix actor isolation and CMTimeRange field access
cancelAndFinishNow is actor-isolated and needs await. CMTimeRange
uses start/duration, not lowerBound/upperBound.
Assisted-by: Claude Opus 4.6 via pi
diff --git a/sous_chef/Sources/SousChef.swift b/sous_chef/Sources/SousChef.swift
index 578731c..f8971d0 100644
--- a/sous_chef/Sources/SousChef.swift
+++ b/sous_chef/Sources/SousChef.swift
@@ -58,7 +58,7 @@ struct SousChef: AsyncParsableCommand {
if let lastSampleTime {
try await analyzer.finalizeAndFinish(through: lastSampleTime)
} else {
- try analyzer.cancelAndFinishNow()
+ await analyzer.cancelAndFinishNow()
}
segments = try await resultsTask.value
@@ -80,8 +80,8 @@ struct SousChef: AsyncParsableCommand {
for run in text.runs {
if let timeRange = run.audioTimeRange {
- let start = CMTimeGetSeconds(timeRange.lowerBound)
- let end = CMTimeGetSeconds(timeRange.upperBound)
+ let start = CMTimeGetSeconds(timeRange.start)
+ let end = CMTimeGetSeconds(timeRange.start + timeRange.duration)
if earliest == nil || start < earliest! { earliest = start }
if latest == nil || end > latest! { latest = end }
}