diff --git a/Telegram/Telegram-iOS/Resources/begin_record.caf b/Telegram/Telegram-iOS/Resources/begin_record.caf deleted file mode 100644 index 3d2e9c4813..0000000000 Binary files a/Telegram/Telegram-iOS/Resources/begin_record.caf and /dev/null differ diff --git a/Telegram/Telegram-iOS/Resources/begin_record.mp3 b/Telegram/Telegram-iOS/Resources/begin_record.mp3 new file mode 100644 index 0000000000..8a5cf9fb82 Binary files /dev/null and b/Telegram/Telegram-iOS/Resources/begin_record.mp3 differ diff --git a/Telegram/Telegram-iOS/Resources/voip_busy.caf b/Telegram/Telegram-iOS/Resources/voip_busy.caf deleted file mode 100644 index 7a6d839506..0000000000 Binary files a/Telegram/Telegram-iOS/Resources/voip_busy.caf and /dev/null differ diff --git a/Telegram/Telegram-iOS/Resources/voip_busy.mp3 b/Telegram/Telegram-iOS/Resources/voip_busy.mp3 new file mode 100644 index 0000000000..08f9897a25 Binary files /dev/null and b/Telegram/Telegram-iOS/Resources/voip_busy.mp3 differ diff --git a/Telegram/Telegram-iOS/Resources/voip_end.caf b/Telegram/Telegram-iOS/Resources/voip_end.caf deleted file mode 100644 index c0a22b1389..0000000000 Binary files a/Telegram/Telegram-iOS/Resources/voip_end.caf and /dev/null differ diff --git a/Telegram/Telegram-iOS/Resources/voip_end.mp3 b/Telegram/Telegram-iOS/Resources/voip_end.mp3 new file mode 100644 index 0000000000..2bf50b2f22 Binary files /dev/null and b/Telegram/Telegram-iOS/Resources/voip_end.mp3 differ diff --git a/Telegram/Telegram-iOS/Resources/voip_fail.caf b/Telegram/Telegram-iOS/Resources/voip_fail.caf deleted file mode 100644 index 17e0da3de4..0000000000 Binary files a/Telegram/Telegram-iOS/Resources/voip_fail.caf and /dev/null differ diff --git a/Telegram/Telegram-iOS/Resources/voip_fail.mp3 b/Telegram/Telegram-iOS/Resources/voip_fail.mp3 new file mode 100644 index 0000000000..fc87e864a0 Binary files /dev/null and b/Telegram/Telegram-iOS/Resources/voip_fail.mp3 differ diff --git a/Telegram/Telegram-iOS/Resources/voip_ringback.caf b/Telegram/Telegram-iOS/Resources/voip_ringback.caf deleted file mode 100644 index af7253776c..0000000000 Binary files a/Telegram/Telegram-iOS/Resources/voip_ringback.caf and /dev/null differ diff --git a/Telegram/Telegram-iOS/Resources/voip_ringback.mp3 b/Telegram/Telegram-iOS/Resources/voip_ringback.mp3 new file mode 100644 index 0000000000..ff955a38a6 Binary files /dev/null and b/Telegram/Telegram-iOS/Resources/voip_ringback.mp3 differ diff --git a/submodules/Postbox/Sources/Postbox.swift b/submodules/Postbox/Sources/Postbox.swift index aca2b8896e..262612663f 100644 --- a/submodules/Postbox/Sources/Postbox.swift +++ b/submodules/Postbox/Sources/Postbox.swift @@ -1420,7 +1420,7 @@ public final class Postbox { self.seedConfiguration = seedConfiguration self.tempDir = tempDir - postboxLog("MediaBox path: \(self.basePath + "/media")") + postboxLog("MediaBox path: \(basePath + "/media")") self.mediaBox = MediaBox(basePath: self.basePath + "/media") self.valueBox = valueBox diff --git a/submodules/TelegramCallsUI/Sources/PresentationCallToneData.swift b/submodules/TelegramCallsUI/Sources/PresentationCallToneData.swift index 065a6939d7..0d4afbbed2 100644 --- a/submodules/TelegramCallsUI/Sources/PresentationCallToneData.swift +++ b/submodules/TelegramCallsUI/Sources/PresentationCallToneData.swift @@ -108,15 +108,15 @@ enum PresentationCallTone: Equatable { func presentationCallToneData(_ tone: PresentationCallTone) -> Data? { switch tone { case .ringing: - return loadToneData(name: "voip_ringback.caf") + return loadToneData(name: "voip_ringback.mp3") case .connecting: return loadToneData(name: "voip_connecting.mp3") case .busy: - return loadToneData(name: "voip_busy.caf") + return loadToneData(name: "voip_busy.mp3") case .failed: - return loadToneData(name: "voip_fail.caf") + return loadToneData(name: "voip_fail.mp3") case .ended: - return loadToneData(name: "voip_end.caf") + return loadToneData(name: "voip_end.mp3") case .groupJoined: return loadToneData(name: "voip_group_joined.mp3") case .groupLeft: diff --git a/submodules/TelegramCallsUI/Sources/VoiceChatController.swift b/submodules/TelegramCallsUI/Sources/VoiceChatController.swift index e7b4e45c0a..340a86e015 100644 --- a/submodules/TelegramCallsUI/Sources/VoiceChatController.swift +++ b/submodules/TelegramCallsUI/Sources/VoiceChatController.swift @@ -1544,7 +1544,7 @@ public final class VoiceChatController: ViewController { self.bottomPanelNode.addSubnode(self.bottomCornersNode) self.bottomPanelNode.addSubnode(self.bottomPanelBackgroundNode) self.bottomPanelNode.addSubnode(self.audioButton) - if let mainVideoContainer = self.mainVideoContainer { + if let _ = self.mainVideoContainer { self.bottomPanelNode.addSubnode(self.cameraButton) self.bottomPanelNode.addSubnode(self.switchCameraButton) } @@ -2995,7 +2995,13 @@ public final class VoiceChatController: ViewController { let secondButtonFrame: CGRect let thirdButtonFrame: CGRect let forthButtonFrame: CGRect - let leftButtonFrame = CGRect(origin: CGPoint(x: sideButtonOrigin, y: floor((self.effectiveBottomAreaHeight - sideButtonSize.height - upperButtonDistance - cameraButtonSize.height) / 2.0) + upperButtonDistance + cameraButtonSize.height), size: sideButtonSize) + + let leftButtonFrame: CGRect + if self.mainVideoContainer == nil { + leftButtonFrame = CGRect(origin: CGPoint(x: sideButtonOrigin, y: floor((self.effectiveBottomAreaHeight - sideButtonSize.height) / 2.0)), size: sideButtonSize) + } else { + leftButtonFrame = CGRect(origin: CGPoint(x: sideButtonOrigin, y: floor((self.effectiveBottomAreaHeight - sideButtonSize.height - upperButtonDistance - cameraButtonSize.height) / 2.0) + upperButtonDistance + cameraButtonSize.height), size: sideButtonSize) + } let rightButtonFrame = CGRect(origin: CGPoint(x: size.width - sideButtonOrigin - sideButtonSize.width, y: floor((self.effectiveBottomAreaHeight - sideButtonSize.height) / 2.0)), size: sideButtonSize) let smallButtons: Bool diff --git a/submodules/TelegramUI/Sounds/MessageSent.caf b/submodules/TelegramUI/Sounds/MessageSent.caf deleted file mode 100644 index 68164c0ea9..0000000000 Binary files a/submodules/TelegramUI/Sounds/MessageSent.caf and /dev/null differ diff --git a/submodules/TelegramUI/Sounds/MessageSent.mp3 b/submodules/TelegramUI/Sounds/MessageSent.mp3 new file mode 100644 index 0000000000..0a25e8bf23 Binary files /dev/null and b/submodules/TelegramUI/Sounds/MessageSent.mp3 differ diff --git a/submodules/TelegramUI/Sounds/notification.caf b/submodules/TelegramUI/Sounds/notification.caf deleted file mode 100644 index f3f16ae66f..0000000000 Binary files a/submodules/TelegramUI/Sounds/notification.caf and /dev/null differ diff --git a/submodules/TelegramUI/Sounds/notification.mp3 b/submodules/TelegramUI/Sounds/notification.mp3 new file mode 100644 index 0000000000..46480d6da1 Binary files /dev/null and b/submodules/TelegramUI/Sounds/notification.mp3 differ diff --git a/submodules/TelegramUI/Sources/AudioRecordningToneData.swift b/submodules/TelegramUI/Sources/AudioRecordningToneData.swift index 36fc878c01..1241bb3d97 100644 --- a/submodules/TelegramUI/Sources/AudioRecordningToneData.swift +++ b/submodules/TelegramUI/Sources/AudioRecordningToneData.swift @@ -11,7 +11,7 @@ private func loadAudioRecordingToneData() -> Data? { AVLinearPCMIsBigEndianKey: false as NSNumber ] - guard let url = Bundle.main.url(forResource: "begin_record", withExtension: "caf") else { + guard let url = Bundle.main.url(forResource: "begin_record", withExtension: "mp3") else { return nil } diff --git a/submodules/TelegramUI/Sources/ManagedAudioRecorder.swift b/submodules/TelegramUI/Sources/ManagedAudioRecorder.swift index 58c481129a..2bbd55a7a9 100644 --- a/submodules/TelegramUI/Sources/ManagedAudioRecorder.swift +++ b/submodules/TelegramUI/Sources/ManagedAudioRecorder.swift @@ -136,7 +136,7 @@ private func rendererInputProc(refCon: UnsafeMutableRawPointer, ioActionFlags: U } private let beginToneData: TonePlayerData? = { - guard let url = Bundle.main.url(forResource: "begin_record", withExtension: "caf") else { + guard let url = Bundle.main.url(forResource: "begin_record", withExtension: "mp3") else { return nil } return loadTonePlayerData(path: url.path) diff --git a/submodules/TelegramUI/Sources/ServiceSoundManager.swift b/submodules/TelegramUI/Sources/ServiceSoundManager.swift index 6a856ca430..363c12ec75 100644 --- a/submodules/TelegramUI/Sources/ServiceSoundManager.swift +++ b/submodules/TelegramUI/Sources/ServiceSoundManager.swift @@ -20,8 +20,8 @@ public final class ServiceSoundManager { init() { self.queue.async { - self.messageDeliverySound = loadSystemSoundFromBundle(name: "MessageSent.caf") - self.incomingMessageSound = loadSystemSoundFromBundle(name: "notification.caf") + self.messageDeliverySound = loadSystemSoundFromBundle(name: "MessageSent.mp3") + self.incomingMessageSound = loadSystemSoundFromBundle(name: "notification.mp3") } }