mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
[WIP] Voice chats
This commit is contained in:
@@ -179,10 +179,10 @@ private func readPacketCallback(userData: UnsafeMutableRawPointer?, buffer: Unsa
|
||||
}
|
||||
}
|
||||
if let fetchedData = fetchedData {
|
||||
precondition(fetchedData.count <= readCount)
|
||||
assert(fetchedData.count <= readCount)
|
||||
fetchedData.withUnsafeBytes { bytes -> Void in
|
||||
precondition(bytes.baseAddress != nil)
|
||||
memcpy(buffer, bytes.baseAddress, fetchedData.count)
|
||||
memcpy(buffer, bytes.baseAddress, min(fetchedData.count, readCount))
|
||||
}
|
||||
fetchedCount = Int32(fetchedData.count)
|
||||
context.readingOffset += Int(fetchedCount)
|
||||
|
||||
Reference in New Issue
Block a user