A lot of updates (Speed improvement)
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
#include "SpeakingClient.h"
|
||||
#include "src/InstanceHandler.h"
|
||||
#include "StringVariable.h"
|
||||
#include "src/music/MusicBotManager.h"
|
||||
#include "misc/timer.h"
|
||||
|
||||
using namespace std::chrono;
|
||||
@@ -99,9 +98,10 @@ void SpeakingClient::handlePacketVoice(const pipes::buffer_view& data, bool head
|
||||
memcpy(&buffer[5], &data[3], data.length() - 3);
|
||||
}
|
||||
|
||||
auto bview = pipes::buffer_view{buffer, data.length() + 2};
|
||||
for (const auto& client : target_clients) {
|
||||
auto speaking_client = static_pointer_cast<SpeakingClient>(client);
|
||||
speaking_client->send_voice_packet(pipes::buffer_view{buffer, data.length() + 2}, flags);
|
||||
speaking_client->send_voice_packet(bview, flags);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user