mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
- macos related
This commit is contained in:
parent
cb7d6f8593
commit
6b82d49945
2 changed files with 8 additions and 0 deletions
|
|
@ -439,7 +439,11 @@ private final class MediaPlayerContext {
|
|||
self.audioRenderer = nil
|
||||
|
||||
var timebase: CMTimebase?
|
||||
#if os(macOS)
|
||||
CMTimebaseCreateWithMasterClock(allocator: nil, masterClock: CMClockGetHostTimeClock(), timebaseOut: &timebase)
|
||||
#else
|
||||
CMTimebaseCreateWithSourceClock(allocator: nil, sourceClock: CMClockGetHostTimeClock(), timebaseOut: &timebase)
|
||||
#endif
|
||||
controlTimebase = MediaPlayerControlTimebase(timebase: timebase!, isAudio: false)
|
||||
CMTimebaseSetTime(timebase!, time: seekResult.timestamp)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -884,7 +884,11 @@ public final class MediaPlayerAudioRenderer {
|
|||
self.audioClock = audioClock!
|
||||
|
||||
var audioTimebase: CMTimebase?
|
||||
#if os(macOS)
|
||||
CMTimebaseCreateWithMasterClock(allocator: nil, masterClock: audioClock!, timebaseOut: &audioTimebase)
|
||||
#else
|
||||
CMTimebaseCreateWithSourceClock(allocator: nil, sourceClock: audioClock!, timebaseOut: &audioTimebase)
|
||||
#endif
|
||||
self.audioTimebase = audioTimebase!
|
||||
|
||||
audioPlayerRendererQueue.async {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue