diff --git a/Sources/Extension/AVCaptureSession+Extension.swift b/Sources/Extension/AVCaptureSession+Extension.swift index 8df04b1eb..338cd0610 100644 --- a/Sources/Extension/AVCaptureSession+Extension.swift +++ b/Sources/Extension/AVCaptureSession+Extension.swift @@ -17,8 +17,7 @@ extension AVCaptureSession { } } } -#endif - +#else @available(tvOS 17.0, *) extension AVCaptureSession { @available(iOS, obsoleted: 16.0) @@ -36,4 +35,5 @@ extension AVCaptureSession { } } } +#endif // swiftlint:enable unused_setter_value diff --git a/Sources/IO/IOAudioMixerByMultiTrack.swift b/Sources/IO/IOAudioMixerByMultiTrack.swift index 4d4c0f890..82de20d3f 100644 --- a/Sources/IO/IOAudioMixerByMultiTrack.swift +++ b/Sources/IO/IOAudioMixerByMultiTrack.swift @@ -1,4 +1,5 @@ import AVFoundation +import CoreAudio import Foundation final class IOAudioMixerByMultiTrack: IOAudioMixerConvertible { diff --git a/Sources/IO/IOAudioMonitor.swift b/Sources/IO/IOAudioMonitor.swift index 8dca3b908..1d667127c 100644 --- a/Sources/IO/IOAudioMonitor.swift +++ b/Sources/IO/IOAudioMonitor.swift @@ -1,5 +1,6 @@ import AudioUnit import AVFoundation +import CoreAudio import CoreMedia import Foundation diff --git a/Sources/IO/IOAudioRingBuffer.swift b/Sources/IO/IOAudioRingBuffer.swift index b554aedcd..49ac40afe 100644 --- a/Sources/IO/IOAudioRingBuffer.swift +++ b/Sources/IO/IOAudioRingBuffer.swift @@ -1,5 +1,6 @@ import Accelerate import AVFoundation +import CoreAudio import CoreMedia import Foundation diff --git a/Sources/Screen/Shape.swift b/Sources/Screen/Shape.swift index 7dd343f8f..649c27bcc 100644 --- a/Sources/Screen/Shape.swift +++ b/Sources/Screen/Shape.swift @@ -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) diff --git a/Tests/RTMP/RTMPTimestampTests.swift b/Tests/RTMP/RTMPTimestampTests.swift index 2782a05a2..d572db090 100644 --- a/Tests/RTMP/RTMPTimestampTests.swift +++ b/Tests/RTMP/RTMPTimestampTests.swift @@ -15,12 +15,12 @@ final class RTMPTimestampTests: XCTestCase { CMTime(value: 286340338232723, timescale: 1000000000), ] var timestamp = RTMPTimestamp() - 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() { @@ -33,11 +33,11 @@ final class RTMPTimestampTests: XCTestCase { .init(hostTime: 6901297434500, sampleTime: 13802594869, atRate: 48000), ] var timestamp = RTMPTimestamp() - 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])) } }