From b95dd3e0357bd54a2c804ce4ead4bb3f93d7adce Mon Sep 17 00:00:00 2001 From: jenz Date: Sun, 13 Sep 2026 20:06:38 +0100 Subject: [PATCH] constant expressios required, probably due to clang being more strict now --- extension.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/extension.cpp b/extension.cpp index 065da06..ef0e083 100644 --- a/extension.cpp +++ b/extension.cpp @@ -1095,7 +1095,8 @@ void CVoice::BroadcastVoiceDataTorchlightCelt(IClient *pClient, int16_t *pPCM, i const int STEP = m_CeltEncoderSettings.SampleRate_Hz; // 22050 const int DIV = 24000; const int CELT_FRAME_SIZE = m_CeltEncoderSettings.FrameSize; // 512 - const int CELT_PACKET_SIZE = m_CeltEncoderSettings.PacketSize; // 64 + //const int CELT_PACKET_SIZE = m_CeltEncoderSettings.PacketSize; // 64 + constexpr int CELT_PACKET_SIZE = 64; int fromSlot = pClient->GetPlayerSlot(); int maxClients = iserver->GetClientCount(); @@ -1239,7 +1240,7 @@ void CVoice::PushPlayerVoiceData(int playerSlot, int nBytes, char *data) 4: 0x68 (TOC) */ //frame 1 always starts at offset 18. - int MaxFrames = 16; + constexpr int MaxFrames = 16; int16_t pcmFrameBuffer[480 * MaxFrames]; int totalDecodedSamples = 0;