[WIP] Call tones

This commit is contained in:
Ali
2022-12-02 14:45:54 +04:00
parent 2345a1b8d2
commit 430dd4defd
7 changed files with 121 additions and 43 deletions

View File

@@ -2484,11 +2484,19 @@ public final class PresentationGroupCallImpl: PresentationGroupCall {
}
private func beginTone(tone: PresentationCallTone) {
if self.isStream {
switch tone {
case .groupJoined, .groupLeft:
return
default:
break
}
}
if let toneData = presentationCallToneData(tone) {
self.genericCallContext?.setTone(tone: OngoingGroupCallContext.Tone(
samples: toneData,
sampleRate: 44100,
loopCount: 1000
loopCount: tone.loopCount ?? 100000
))
}