mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 14:45:21 +00:00
Use host time clock if audio clock is not available
This commit is contained in:
@@ -703,6 +703,9 @@ public final class MediaPlayerAudioRenderer {
|
||||
public init(audioSession: MediaPlayerAudioSessionControl, playAndRecord: Bool, forceAudioToSpeaker: Bool, baseRate: Double, updatedRate: @escaping () -> Void, audioPaused: @escaping () -> Void) {
|
||||
var audioClock: CMClock?
|
||||
CMAudioClockCreate(allocator: nil, clockOut: &audioClock)
|
||||
if audioClock == nil {
|
||||
audioClock = CMClockGetHostTimeClock()
|
||||
}
|
||||
self.audioClock = audioClock!
|
||||
|
||||
var audioTimebase: CMTimebase?
|
||||
|
||||
Reference in New Issue
Block a user