Skip to content

Commit

Permalink
fix can't compile macCatalys 1.9.x
Browse files Browse the repository at this point in the history
  • Loading branch information
shogo4405 committed Nov 5, 2024
1 parent 991dcab commit 4e66bbf
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 17 deletions.
4 changes: 2 additions & 2 deletions Sources/Extension/AVCaptureSession+Extension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ extension AVCaptureSession {
}
}
}
#endif

#else
@available(tvOS 17.0, *)
extension AVCaptureSession {
@available(iOS, obsoleted: 16.0)
Expand All @@ -36,4 +35,5 @@ extension AVCaptureSession {
}
}
}
#endif
// swiftlint:enable unused_setter_value
1 change: 1 addition & 0 deletions Sources/IO/IOAudioMixerByMultiTrack.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import AVFoundation
import CoreAudio
import Foundation

final class IOAudioMixerByMultiTrack: IOAudioMixerConvertible {
Expand Down
1 change: 1 addition & 0 deletions Sources/IO/IOAudioMonitor.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import AudioUnit
import AVFoundation
import CoreAudio
import CoreMedia
import Foundation

Expand Down
1 change: 1 addition & 0 deletions Sources/IO/IOAudioRingBuffer.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Accelerate
import AVFoundation
import CoreAudio
import CoreMedia
import Foundation

Expand Down
5 changes: 2 additions & 3 deletions Sources/Screen/Shape.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ final class RoundedSquareShape: Shape {
return nil
}
let path = CGPath(roundedRect: rect, cornerWidth: cornerRadius, cornerHeight: cornerRadius, transform: nil)
#if canImport(AppKit)
#if os(macOS)
context.setFillColor(NSColor.white.cgColor)
#endif
#if canImport(UIKit)
#else
context.setFillColor(UIColor.white.cgColor)
#endif
context.addPath(path)
Expand Down
24 changes: 12 additions & 12 deletions Tests/RTMP/RTMPTimestampTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ final class RTMPTimestampTests: XCTestCase {
CMTime(value: 286340338232723, timescale: 1000000000),
]
var timestamp = RTMPTimestamp<CMTime>()
XCTAssertEqual(0, timestamp.update(times[0]))
XCTAssertEqual(33, timestamp.update(times[1]))
XCTAssertEqual(33, timestamp.update(times[2]))
XCTAssertEqual(33, timestamp.update(times[3]))
XCTAssertEqual(34, timestamp.update(times[4]))
XCTAssertEqual(33, timestamp.update(times[5]))
XCTAssertEqual(0, try? timestamp.update(times[0]))
XCTAssertEqual(33, try? timestamp.update(times[1]))
XCTAssertEqual(33, try? timestamp.update(times[2]))
XCTAssertEqual(33, try? timestamp.update(times[3]))
XCTAssertEqual(34, try? timestamp.update(times[4]))
XCTAssertEqual(33, try? timestamp.update(times[5]))
}

func testAVAudioTime() {
Expand All @@ -33,11 +33,11 @@ final class RTMPTimestampTests: XCTestCase {
.init(hostTime: 6901297434500, sampleTime: 13802594869, atRate: 48000),
]
var timestamp = RTMPTimestamp<AVAudioTime>()
XCTAssertEqual(0, timestamp.update(times[0]))
XCTAssertEqual(21, timestamp.update(times[1]))
XCTAssertEqual(21, timestamp.update(times[2]))
XCTAssertEqual(22, timestamp.update(times[3]))
XCTAssertEqual(21, timestamp.update(times[4]))
XCTAssertEqual(21, timestamp.update(times[5]))
XCTAssertEqual(0, try? timestamp.update(times[0]))
XCTAssertEqual(21, try? timestamp.update(times[1]))
XCTAssertEqual(21, try? timestamp.update(times[2]))
XCTAssertEqual(22, try? timestamp.update(times[3]))
XCTAssertEqual(21, try? timestamp.update(times[4]))
XCTAssertEqual(21, try? timestamp.update(times[5]))
}
}

0 comments on commit 4e66bbf

Please sign in to comment.