AR bugfix: UDP format detection

remove early assignment receivedFormat = 2
This commit is contained in:
Frank
2026-01-11 15:17:20 +01:00
parent c5e8a1a080
commit 3ce3718124

View File

@@ -1898,7 +1898,7 @@ class AudioReactive : public Usermod {
// Process each received packet: last value will persist, intermediate ones needed to update sequence counters
if (lastValidPacketSize > 0) {
if (lastValidPacketSize == sizeof(audioSyncPacket) && (isValidUdpSyncVersion((const char *)fftUdpBuffer))) {
receivedFormat = 2;
//receivedFormat = max(receivedFormat, 2); // format V2 or V2+ - will be set in decodeAudioData()
haveFreshData |= decodeAudioData(lastValidPacketSize, fftUdpBuffer);
} else if (lastValidPacketSize == sizeof(audioSyncPacket_v1) && (isValidUdpSyncVersion_v1((const char *)fftUdpBuffer))) {
decodeAudioData_v1(lastValidPacketSize, fftUdpBuffer);