Windows build 1.4.0

This commit is contained in:
WolverinDEV
2019-10-19 16:05:46 +01:00
parent d8c008ad56
commit ee7ae3b395
5 changed files with 31 additions and 9 deletions
@@ -553,7 +553,7 @@ static shared_ptr<ts::protocol::ClientPacket> shuffle_cached_packet;
#endif
void ServerConnection::send_voice_data(const void *buffer, size_t buffer_length, uint8_t codec, bool head) {
auto _buffer = pipes::buffer{ts::protocol::ClientPacket::META_SIZE + buffer_length + 3};
auto packet = make_shared<ts::protocol::ClientPacket>(_buffer);
auto packet = ts::protocol::ClientPacket::from_buffer(_buffer);
memset(&_buffer[ts::protocol::ClientPacket::META_MAC_SIZE], 0, ts::protocol::ClientPacket::META_HEADER_SIZE); /* reset all header data */
packet->type(ts::protocol::PacketTypeInfo::Voice);
@@ -581,7 +581,7 @@ void ServerConnection::send_voice_data(const void *buffer, size_t buffer_length,
shuffle_cached_packet = packet;
}
#else
this->protocol_handler->send_packet(packet);
this->protocol_handler->send_packet(std::shared_ptr<ts::protocol::ClientPacket>(packet.release()));
#endif
}