Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix can't compile macCatalyst 1.9.x #1617

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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]))
}
}