mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Temp
This commit is contained in:
@@ -400,6 +400,18 @@ public final class OngoingGroupCallContext {
|
||||
public var incomingVideoStats: [String: IncomingVideoStats]
|
||||
}
|
||||
|
||||
public final class Tone {
|
||||
public let samples: Data
|
||||
public let sampleRate: Int
|
||||
public let loopCount: Int
|
||||
|
||||
public init(samples: Data, sampleRate: Int, loopCount: Int) {
|
||||
self.samples = samples
|
||||
self.sampleRate = sampleRate
|
||||
self.loopCount = loopCount
|
||||
}
|
||||
}
|
||||
|
||||
private final class Impl {
|
||||
let queue: Queue
|
||||
let context: GroupCallThreadLocalContext
|
||||
@@ -884,6 +896,12 @@ public final class OngoingGroupCallContext {
|
||||
completion(Stats(incomingVideoStats: incomingVideoStats))
|
||||
})
|
||||
}
|
||||
|
||||
func setTone(tone: Tone?) {
|
||||
self.context.setTone(tone.flatMap { tone in
|
||||
CallAudioTone(samples: tone.samples, sampleRate: tone.sampleRate, loopCount: tone.loopCount)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
private let queue = Queue()
|
||||
@@ -1075,4 +1093,10 @@ public final class OngoingGroupCallContext {
|
||||
impl.getStats(completion: completion)
|
||||
}
|
||||
}
|
||||
|
||||
public func setTone(tone: Tone?) {
|
||||
self.impl.with { impl in
|
||||
impl.setTone(tone: tone)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user