Skip to content

Commit ad00003

Browse files
committed
Copilot feedback
1 parent 4aad333 commit ad00003

File tree

5 files changed

+5
-27
lines changed

5 files changed

+5
-27
lines changed

Playground/Views/Components/AudioPlaybackView.swift

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -100,24 +100,6 @@ struct AudioPlaybackView: View {
100100

101101
var body: some View {
102102
VStack(spacing: 8) {
103-
WaveformOverview(
104-
samples: [],
105-
currentTime: player.currentTime,
106-
duration: max(player.duration, 0.01)
107-
)
108-
.overlay(
109-
GeometryReader { geo in
110-
Color.clear.gesture(
111-
DragGesture(minimumDistance: 0)
112-
.onChanged { value in
113-
guard player.duration > 0, geo.size.width > 0 else { return }
114-
let fraction = max(0, min(1, value.location.x / geo.size.width))
115-
player.seek(to: Double(fraction) * player.duration)
116-
}
117-
)
118-
}
119-
)
120-
121103
HStack(spacing: 24) {
122104
Button {
123105
player.seek(to: max(0, player.currentTime - 5))

Playground/Views/History/SessionCompareView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ struct SessionCompareView: View {
6464

6565
if let lt = left.transcriptionTimings, let rt = right.transcriptionTimings {
6666
timingDiffRow("tok/s", left: lt.tokensPerSecond, right: rt.tokensPerSecond, higherIsBetter: true)
67-
timingDiffRow("RTF", left: lt.realTimeFactor, right: rt.realTimeFactor, higherIsBetter: true)
67+
timingDiffRow("RTF", left: lt.realTimeFactor, right: rt.realTimeFactor, higherIsBetter: false)
6868
timingDiffRow("Speed", left: lt.speedFactor, right: rt.speedFactor, higherIsBetter: true)
6969
timingDiffRow("Audio Proc (ms)", left: lt.audioProcessing * 1000, right: rt.audioProcessing * 1000, higherIsBetter: false)
7070
timingDiffRow("Encoding (ms)", left: lt.encoding * 1000, right: rt.encoding * 1000, higherIsBetter: false)

Playground/Views/SidebarView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ struct SidebarView: View {
9595
}
9696
Spacer()
9797
HStack(spacing: 4) {
98-
Link(destination: URL(string: "http://argmaxinc.com/#SDK")!) {
98+
Link(destination: URL(string: "https://argmaxinc.com/#SDK")!) {
9999
Image(systemName: "info.circle")
100100
.font(.footnote)
101101
.foregroundColor(.blue)

Playground/Views/Transcription/StreamTabView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,8 @@ struct StreamTabView: View {
337337

338338
private func updateStats(transcription: TranscriptionResultPro) {
339339
tokensPerSecond = transcription.timings.tokensPerSecond
340-
currentEncodingLoops += Int(transcription.timings.totalEncodingRuns)
341-
currentDecodingLoops += Int(transcription.timings.totalDecodingLoops)
340+
currentEncodingLoops = Int(transcription.timings.totalEncodingRuns)
341+
currentDecodingLoops = Int(transcription.timings.totalDecodingLoops)
342342
bufferSeconds = transcription.timings.inputAudioSeconds
343343
}
344344

PlaygroundTests/AudioFileWriterTests.swift

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,7 @@ final class AudioFileWriterTests: XCTestCase {
2525
let halfSecondOfSamples = [Float](repeating: 0.1, count: 8000)
2626
writer.append(samples: halfSecondOfSamples)
2727

28-
// Allow time for async queue
29-
let expectation = expectation(description: "Wait for write")
30-
DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { expectation.fulfill() }
31-
waitForExpectations(timeout: 1)
32-
28+
// duration uses queue.sync internally, which serializes after the async append
3329
let duration = writer.duration
3430
XCTAssertGreaterThan(duration, 0.4, "Duration should be approximately 0.5s")
3531
XCTAssertLessThan(duration, 0.6, "Duration should be approximately 0.5s")

0 commit comments

Comments
 (0)