Voice: server-side proximity voice chat (M1), on a fetched MafiaNet - #243
Conversation
MafiaNet owns RakVoice, and therefore owns RakVoice's Opus and RNNoise dependencies, which its own build already fetches. Vendoring a trimmed MafiaNet copy here meant hoisting those two a level up into this repository, which was the wrong dependency boundary and cost accordingly: ~85 MB of third-party source, a re-vendor split across three trees that had to stay in lockstep, and a collision with .gitignore's vendors/**/*.cmake rule that silently excluded seven Opus CMake modules from the commit -- enough to fail every CI configure while a warm local build tree kept working. Framework now fetches the MafiaNet release and links the exported MafiaNet::MafiaNetStatic target, whose PUBLIC includes replace the hand-rolled path into the vendored tree. The pin lives in cmake/MafiaNetPin.cmake rather than inline. MafiaNet's message-id enum is positional, so moving the pin can shift every id and break every peer built against the old header; bump_version.sh classifies a release by which paths changed, and with MafiaNet no longer in this tree a wire break has no path to detect. The pin file is that path. It sits in cmake/ specifically because vendors/**/*.cmake would have hidden it. Also repairs a dangling major_paths entry pointing at code/framework/src/networking/messages, deleted long ago; replication is where the sync flow lives now. This is the only FetchContent in the build. Everything else under vendors/ remains vendored in-tree, so a cold configure now needs network access.
Clients encode Opus frames and send them to the server; the server decides
who hears each frame and forwards the payload without ever decoding it.
The server stays authoritative over who hears whom -- a hacked client
cannot hear players it is not allowed to, because it never receives their
bytes -- at roughly a memcpy per recipient instead of a codec.
The relay protocol itself lives in MafiaNet (v0.13.0) rather than here,
since it belongs to RakVoice. This is the Framework half:
voice_config.h shared audio format and routing constants
VoiceRouter who hears a talker: a pure function of positions and
mute state, so it is testable without a server
SpscRing wait-free PCM handoff across the audio-thread boundary
Mixer distance attenuation and constant-power stereo pan
VoiceServer relay host attach, per-tick position refresh, cached
recipient sets, impersonation guard
The client half -- audio device, client pipeline, M2O integration -- is
deliberately absent: FrameworkClient is WIN32-only, so none of it can be
compiled or hardware-verified here, and landing it unbuilt would mean
three tasks nobody could compile, let alone hear. The plan carries
annotated notes for that session, including one that invalidates its own
loopback verification step.
24 tests across three modules, each mutation-checked: inverting the
local-mute condition, reversing the pan cross-product, and dropping the
ring's reserved slot each make a test fail. The ring was additionally
verified under ThreadSanitizer with a validated negative control.
VoiceServer has no automated tests -- it needs a live RakPeerInterface --
so its impersonation guard is unverified here. The equivalent parsing
checks are covered upstream in MafiaNet's own suite.
|
Warning Review limit reached
Next review available in: 25 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
WalkthroughIntroduces a voice subsystem with proximity routing, stereo mixing primitives, an SPSC ring buffer, server-side RakVoice relay integration, pinned MafiaNet FetchContent builds, and unit tests covering routing, mixing, and buffering. ChangesVoice feature
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 13
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/bump_version.sh:
- Around line 29-30: Update the major-path matcher in the version bump logic to
enforce a path boundary after each configured entry, so it matches the entry
itself or descendants only when followed by a slash, not similarly prefixed
filenames or directories such as cmake/MafiaNetPin.cmake.bak or replication2.
Preserve the documented exact-file and directory-prefix behavior.
In `@cmake/MafiaNetPin.cmake`:
- Around line 19-20: Make MAFIANET_PIN an enforced resolved commit hash rather
than a user-overridable CACHE STRING, using a cache strategy that overwrites
existing and command-line values. Update the FetchContent declaration to consume
this immutable pin, and remove GIT_SHALLOW TRUE from the MafiaNet declaration in
vendors/CMakeLists.txt.
In `@code/framework/src/voice/server/voice_server.cpp`:
- Around line 93-129: Update VoiceServer::OnVoiceFrame to accept the resolved
packet data offset from GetPacketDataOffset and use that offset when validating
relay-frame length bounds. Ensure timestamped packets are checked based on the
actual forwarded relay payload, while preserving the existing origin, recipient,
and relay behavior.
In `@docs/superpowers/plans/2026-07-28-voice-chat-m1-proximity.md`:
- Around line 104-109: Update the fenced block describing VERSION.txt in the
voice chat plan to include an explicit text language marker, such as text, while
preserving its existing content.
- Around line 998-1004: Remove the stale candidates partial_sort/resize
recipient truncation from
docs/superpowers/plans/2026-07-28-voice-chat-m1-proximity.md lines 998-1004,
leaving the implementation example to retain every eligible candidate; update
lines 2267-2269 to state that the server forwards every eligible listener in
range, while only the client speaker-slot count remains bounded.
- Around line 2319-2335: Update VoiceClient::Init to explicitly set the encoder
bitrate with the existing kBitrate symbol, and disable RNNoise by changing
SetNoiseFilter(true) to the inactive setting required for 960-sample frames.
Keep the remaining voice initialization sequence unchanged.
- Around line 2106-2112: Replace the invalid self-loopback verification with a
relay-aware two-peer or relay-stub echo test, unless the implementation
explicitly adds a loopback exemption in OnRelayVoiceData gated by loopbackMode.
In docs/superpowers/plans/2026-07-28-voice-chat-m1-proximity.md lines 2106-2112,
retain the corrected requirement; update lines 2553-2557 to remove the
SetLoopbackMode(true) self-loopback procedure; and update
docs/superpowers/specs/2026-07-28-voice-chat-design.md lines 260-265 to describe
the relay-aware testing strategy.
- Around line 17-24: Update the M1 audio-format constraints in the plan so the
RNNoise setting states that RNNoise is disabled for 20 ms/960-sample frames,
keeping the remaining Opus and audio requirements unchanged.
- Around line 369-389: Synchronize all relay-protocol documentation with the
shipped versioned format: in
docs/superpowers/plans/2026-07-28-voice-chat-m1-proximity.md lines 369-389,
document the format-version byte and derive all header offsets and overhead from
it; in lines 426-449, validate packet size and version before reading relay
fields and use the updated offsets; in lines 2002-2019, add the current packet
null/size validation before accessing packet->guid; and in
docs/superpowers/specs/2026-07-28-voice-chat-design.md lines 79-80, update the
relay packet layout and overhead to include the version byte.
- Around line 20-21: Update
docs/superpowers/plans/2026-07-28-voice-chat-m1-proximity.md lines 20-21 to
describe the pinned MafiaNet v0.13.0 FetchContent integration instead of
v0.10-era vendoring and the prohibition on FetchContent; update
docs/superpowers/specs/2026-07-28-voice-chat-design.md lines 59-70 to use
MafiaNet v0.13.0 and the same FetchContent acquisition model, keeping the
documented integration details consistent across both documents.
In `@docs/superpowers/specs/2026-07-28-voice-chat-design.md`:
- Around line 112-123: Update the fenced code block containing the voice module
tree in the design specification to use the text language marker. Leave the
diagram contents unchanged.
- Around line 125-126: Update the CoreModules API description in the voice chat
design spec to replace SetVoice()/GetVoice() with the shipped
SetVoiceServer()/GetVoiceServer() and SetVoiceClient()/GetVoiceClient()
accessors, while preserving the existing CoreModules registration pattern
reference.
- Line 78: Update the packet-format fenced code block in the voice chat design
specification to declare the `text` language (or an equivalent supported
plain-text fence), resolving the markdownlint warning without changing the
block’s contents.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: e5fbff9f-e7b6-4dc2-98a0-1dd6be24d998
📒 Files selected for processing (308)
.github/bump_version.shCLAUDE.mdcmake/MafiaNetPin.cmakecode/framework/CMakeLists.txtcode/framework/src/core_modules.hcode/framework/src/integrations/server/instance.cppcode/framework/src/integrations/server/instance.hcode/framework/src/voice/client/mixer.cppcode/framework/src/voice/client/mixer.hcode/framework/src/voice/client/spsc_ring.hcode/framework/src/voice/server/voice_router.cppcode/framework/src/voice/server/voice_router.hcode/framework/src/voice/server/voice_server.cppcode/framework/src/voice/server/voice_server.hcode/framework/src/voice/voice_config.hcode/tests/CMakeLists.txtcode/tests/framework_ut.cppcode/tests/modules/spsc_ring_ut.hcode/tests/modules/voice_mixer_ut.hcode/tests/modules/voice_router_ut.hdocs/superpowers/plans/2026-07-28-voice-chat-m1-proximity.mddocs/superpowers/specs/2026-07-28-voice-chat-design.mdvendors/CMakeLists.txtvendors/mafianet/CMakeLists.txtvendors/mafianet/LICENSE.mdvendors/mafianet/README.mdvendors/mafianet/Source/CMakeLists.txtvendors/mafianet/Source/include/mafianet/AutopatcherPatchContext.hvendors/mafianet/Source/include/mafianet/AutopatcherRepositoryInterface.hvendors/mafianet/Source/include/mafianet/Base64Encoder.hvendors/mafianet/Source/include/mafianet/BitStream.hvendors/mafianet/Source/include/mafianet/CCRakNetSlidingWindow.hvendors/mafianet/Source/include/mafianet/CCRakNetUDT.hvendors/mafianet/Source/include/mafianet/CheckSum.hvendors/mafianet/Source/include/mafianet/CloudClient.hvendors/mafianet/Source/include/mafianet/CloudCommon.hvendors/mafianet/Source/include/mafianet/CloudServer.hvendors/mafianet/Source/include/mafianet/CommandParserInterface.hvendors/mafianet/Source/include/mafianet/ConnectionGraph2.hvendors/mafianet/Source/include/mafianet/ConsoleServer.hvendors/mafianet/Source/include/mafianet/DR_SHA1.hvendors/mafianet/Source/include/mafianet/DS_BPlusTree.hvendors/mafianet/Source/include/mafianet/DS_BinarySearchTree.hvendors/mafianet/Source/include/mafianet/DS_BytePool.hvendors/mafianet/Source/include/mafianet/DS_ByteQueue.hvendors/mafianet/Source/include/mafianet/DS_Hash.hvendors/mafianet/Source/include/mafianet/DS_Heap.hvendors/mafianet/Source/include/mafianet/DS_HuffmanEncodingTree.hvendors/mafianet/Source/include/mafianet/DS_HuffmanEncodingTreeFactory.hvendors/mafianet/Source/include/mafianet/DS_HuffmanEncodingTreeNode.hvendors/mafianet/Source/include/mafianet/DS_LinkedList.hvendors/mafianet/Source/include/mafianet/DS_List.hvendors/mafianet/Source/include/mafianet/DS_Map.hvendors/mafianet/Source/include/mafianet/DS_MemoryPool.hvendors/mafianet/Source/include/mafianet/DS_Multilist.hvendors/mafianet/Source/include/mafianet/DS_OrderedChannelHeap.hvendors/mafianet/Source/include/mafianet/DS_OrderedList.hvendors/mafianet/Source/include/mafianet/DS_Queue.hvendors/mafianet/Source/include/mafianet/DS_QueueLinkedList.hvendors/mafianet/Source/include/mafianet/DS_RangeList.hvendors/mafianet/Source/include/mafianet/DS_Table.hvendors/mafianet/Source/include/mafianet/DS_ThreadsafeAllocatingQueue.hvendors/mafianet/Source/include/mafianet/DS_Tree.hvendors/mafianet/Source/include/mafianet/DS_WeightedGraph.hvendors/mafianet/Source/include/mafianet/DataCompressor.hvendors/mafianet/Source/include/mafianet/DirectoryDeltaTransfer.hvendors/mafianet/Source/include/mafianet/DynDNS.hvendors/mafianet/Source/include/mafianet/EmailSender.hvendors/mafianet/Source/include/mafianet/EmptyHeader.hvendors/mafianet/Source/include/mafianet/EpochTimeToString.hvendors/mafianet/Source/include/mafianet/Export.hvendors/mafianet/Source/include/mafianet/FileList.hvendors/mafianet/Source/include/mafianet/FileListNodeContext.hvendors/mafianet/Source/include/mafianet/FileListTransfer.hvendors/mafianet/Source/include/mafianet/FileListTransferCBInterface.hvendors/mafianet/Source/include/mafianet/FileOperations.hvendors/mafianet/Source/include/mafianet/FormatString.hvendors/mafianet/Source/include/mafianet/FullyConnectedMesh2.hvendors/mafianet/Source/include/mafianet/GetTime.hvendors/mafianet/Source/include/mafianet/Getche.hvendors/mafianet/Source/include/mafianet/Gets.hvendors/mafianet/Source/include/mafianet/GridSectorizer.hvendors/mafianet/Source/include/mafianet/HTTPConnection.hvendors/mafianet/Source/include/mafianet/HTTPConnection2.hvendors/mafianet/Source/include/mafianet/IncrementalReadInterface.hvendors/mafianet/Source/include/mafianet/InternalPacket.hvendors/mafianet/Source/include/mafianet/Itoa.hvendors/mafianet/Source/include/mafianet/Kbhit.hvendors/mafianet/Source/include/mafianet/LinuxStrings.hvendors/mafianet/Source/include/mafianet/LocklessTypes.hvendors/mafianet/Source/include/mafianet/LogCommandParser.hvendors/mafianet/Source/include/mafianet/MTUSize.hvendors/mafianet/Source/include/mafianet/MessageFilter.hvendors/mafianet/Source/include/mafianet/MessageIdentifiers.hvendors/mafianet/Source/include/mafianet/NatPunchthroughClient.hvendors/mafianet/Source/include/mafianet/NatPunchthroughServer.hvendors/mafianet/Source/include/mafianet/NatTypeDetectionClient.hvendors/mafianet/Source/include/mafianet/NatTypeDetectionCommon.hvendors/mafianet/Source/include/mafianet/NatTypeDetectionServer.hvendors/mafianet/Source/include/mafianet/NativeFeatureIncludes.hvendors/mafianet/Source/include/mafianet/NativeFeatureIncludesOverrides.hvendors/mafianet/Source/include/mafianet/NativeTypes.hvendors/mafianet/Source/include/mafianet/NetworkIDManager.hvendors/mafianet/Source/include/mafianet/NetworkIDObject.hvendors/mafianet/Source/include/mafianet/PS3Includes.hvendors/mafianet/Source/include/mafianet/PS4Includes.hvendors/mafianet/Source/include/mafianet/PacketConsoleLogger.hvendors/mafianet/Source/include/mafianet/PacketFileLogger.hvendors/mafianet/Source/include/mafianet/PacketLogger.hvendors/mafianet/Source/include/mafianet/PacketOutputWindowLogger.hvendors/mafianet/Source/include/mafianet/PacketPool.hvendors/mafianet/Source/include/mafianet/PacketPriority.hvendors/mafianet/Source/include/mafianet/PacketizedTCP.hvendors/mafianet/Source/include/mafianet/PeerHandle.hvendors/mafianet/Source/include/mafianet/PluginInterface2.hvendors/mafianet/Source/include/mafianet/PointGridSectorizer.hvendors/mafianet/Source/include/mafianet/RPC4Plugin.hvendors/mafianet/Source/include/mafianet/Rackspace.hvendors/mafianet/Source/include/mafianet/Rand.hvendors/mafianet/Source/include/mafianet/RandSync.hvendors/mafianet/Source/include/mafianet/ReadyEvent.hvendors/mafianet/Source/include/mafianet/RefCountedObj.hvendors/mafianet/Source/include/mafianet/RelayPlugin.hvendors/mafianet/Source/include/mafianet/ReliabilityLayer.hvendors/mafianet/Source/include/mafianet/ReplicaEnums.hvendors/mafianet/Source/include/mafianet/ReplicaManager3.hvendors/mafianet/Source/include/mafianet/Router2.hvendors/mafianet/Source/include/mafianet/SecureHandshake.hvendors/mafianet/Source/include/mafianet/SendToThread.hvendors/mafianet/Source/include/mafianet/SignaledEvent.hvendors/mafianet/Source/include/mafianet/SimpleMutex.hvendors/mafianet/Source/include/mafianet/SimpleTCPServer.hvendors/mafianet/Source/include/mafianet/SingleProducerConsumer.hvendors/mafianet/Source/include/mafianet/SocketDefines.hvendors/mafianet/Source/include/mafianet/SocketIncludes.hvendors/mafianet/Source/include/mafianet/SocketLayer.hvendors/mafianet/Source/include/mafianet/StatisticsHistory.hvendors/mafianet/Source/include/mafianet/StringCompressor.hvendors/mafianet/Source/include/mafianet/StringTable.hvendors/mafianet/Source/include/mafianet/SuperFastHash.hvendors/mafianet/Source/include/mafianet/TCPInterface.hvendors/mafianet/Source/include/mafianet/TableSerializer.hvendors/mafianet/Source/include/mafianet/TeamBalancer.hvendors/mafianet/Source/include/mafianet/TeamManager.hvendors/mafianet/Source/include/mafianet/TelnetTransport.hvendors/mafianet/Source/include/mafianet/ThreadPool.hvendors/mafianet/Source/include/mafianet/ThreadsafePacketLogger.hvendors/mafianet/Source/include/mafianet/TransportInterface.hvendors/mafianet/Source/include/mafianet/TwoWayAuthentication.hvendors/mafianet/Source/include/mafianet/UDPForwarder.hvendors/mafianet/Source/include/mafianet/UDPProxyClient.hvendors/mafianet/Source/include/mafianet/UDPProxyCommon.hvendors/mafianet/Source/include/mafianet/UDPProxyCoordinator.hvendors/mafianet/Source/include/mafianet/UDPProxyServer.hvendors/mafianet/Source/include/mafianet/VariableDeltaSerializer.hvendors/mafianet/Source/include/mafianet/VariableListDeltaTracker.hvendors/mafianet/Source/include/mafianet/VariadicSQLParser.hvendors/mafianet/Source/include/mafianet/VirtualWorld.hvendors/mafianet/Source/include/mafianet/VirtualWorldReplica3.hvendors/mafianet/Source/include/mafianet/VitaIncludes.hvendors/mafianet/Source/include/mafianet/WSAStartupSingleton.hvendors/mafianet/Source/include/mafianet/WindowsIncludes.hvendors/mafianet/Source/include/mafianet/XBox360Includes.hvendors/mafianet/Source/include/mafianet/_FindFirst.hvendors/mafianet/Source/include/mafianet/aliases.hvendors/mafianet/Source/include/mafianet/alloca.hvendors/mafianet/Source/include/mafianet/assert.hvendors/mafianet/Source/include/mafianet/commandparser.hvendors/mafianet/Source/include/mafianet/crypto/cryptomanager.hvendors/mafianet/Source/include/mafianet/crypto/factory.hvendors/mafianet/Source/include/mafianet/crypto/fileencrypter.hvendors/mafianet/Source/include/mafianet/crypto/ifileencrypter.hvendors/mafianet/Source/include/mafianet/crypto/securestring.hvendors/mafianet/Source/include/mafianet/defineoverrides.hvendors/mafianet/Source/include/mafianet/defines.hvendors/mafianet/Source/include/mafianet/gettimeofday.hvendors/mafianet/Source/include/mafianet/guid_util.hvendors/mafianet/Source/include/mafianet/linux_adapter.hvendors/mafianet/Source/include/mafianet/mafianet.hvendors/mafianet/Source/include/mafianet/memoryoverride.hvendors/mafianet/Source/include/mafianet/osx_adapter.hvendors/mafianet/Source/include/mafianet/peer.hvendors/mafianet/Source/include/mafianet/peerinterface.hvendors/mafianet/Source/include/mafianet/sleep.hvendors/mafianet/Source/include/mafianet/smartptr.hvendors/mafianet/Source/include/mafianet/socket.hvendors/mafianet/Source/include/mafianet/socket2.hvendors/mafianet/Source/include/mafianet/statistics.hvendors/mafianet/Source/include/mafianet/string.hvendors/mafianet/Source/include/mafianet/thread.hvendors/mafianet/Source/include/mafianet/time.hvendors/mafianet/Source/include/mafianet/transport2.hvendors/mafianet/Source/include/mafianet/types.hvendors/mafianet/Source/include/mafianet/version.hvendors/mafianet/Source/include/mafianet/wstring.hvendors/mafianet/Source/src/Base64Encoder.cppvendors/mafianet/Source/src/BitStream.cppvendors/mafianet/Source/src/CCRakNetSlidingWindow.cppvendors/mafianet/Source/src/CCRakNetUDT.cppvendors/mafianet/Source/src/CheckSum.cppvendors/mafianet/Source/src/CloudClient.cppvendors/mafianet/Source/src/CloudCommon.cppvendors/mafianet/Source/src/CloudServer.cppvendors/mafianet/Source/src/CommandParserInterface.cppvendors/mafianet/Source/src/ConnectionGraph2.cppvendors/mafianet/Source/src/ConsoleServer.cppvendors/mafianet/Source/src/DR_SHA1.cppvendors/mafianet/Source/src/DS_BytePool.cppvendors/mafianet/Source/src/DS_ByteQueue.cppvendors/mafianet/Source/src/DS_HuffmanEncodingTree.cppvendors/mafianet/Source/src/DS_Table.cppvendors/mafianet/Source/src/DataCompressor.cppvendors/mafianet/Source/src/DirectoryDeltaTransfer.cppvendors/mafianet/Source/src/DynDNS.cppvendors/mafianet/Source/src/EmailSender.cppvendors/mafianet/Source/src/EpochTimeToString.cppvendors/mafianet/Source/src/FileList.cppvendors/mafianet/Source/src/FileListTransfer.cppvendors/mafianet/Source/src/FileOperations.cppvendors/mafianet/Source/src/FormatString.cppvendors/mafianet/Source/src/FullyConnectedMesh2.cppvendors/mafianet/Source/src/GetTime.cppvendors/mafianet/Source/src/Getche.cppvendors/mafianet/Source/src/Gets.cppvendors/mafianet/Source/src/GridSectorizer.cppvendors/mafianet/Source/src/HTTPConnection.cppvendors/mafianet/Source/src/HTTPConnection2.cppvendors/mafianet/Source/src/IncrementalReadInterface.cppvendors/mafianet/Source/src/Itoa.cppvendors/mafianet/Source/src/LinuxStrings.cppvendors/mafianet/Source/src/LocklessTypes.cppvendors/mafianet/Source/src/LogCommandParser.cppvendors/mafianet/Source/src/MessageFilter.cppvendors/mafianet/Source/src/NatPunchthroughClient.cppvendors/mafianet/Source/src/NatPunchthroughServer.cppvendors/mafianet/Source/src/NatTypeDetectionClient.cppvendors/mafianet/Source/src/NatTypeDetectionCommon.cppvendors/mafianet/Source/src/NatTypeDetectionServer.cppvendors/mafianet/Source/src/NetworkIDManager.cppvendors/mafianet/Source/src/NetworkIDObject.cppvendors/mafianet/Source/src/PS4Includes.cppvendors/mafianet/Source/src/PacketConsoleLogger.cppvendors/mafianet/Source/src/PacketFileLogger.cppvendors/mafianet/Source/src/PacketLogger.cppvendors/mafianet/Source/src/PacketOutputWindowLogger.cppvendors/mafianet/Source/src/PacketizedTCP.cppvendors/mafianet/Source/src/PeerHandle.cppvendors/mafianet/Source/src/PluginInterface2.cppvendors/mafianet/Source/src/PointGridSectorizer.cppvendors/mafianet/Source/src/RPC4Plugin.cppvendors/mafianet/Source/src/Rackspace.cppvendors/mafianet/Source/src/RakMemoryOverride.cppvendors/mafianet/Source/src/RakNetCommandParser.cppvendors/mafianet/Source/src/RakNetSocket.cppvendors/mafianet/Source/src/RakNetSocket2.cppvendors/mafianet/Source/src/RakNetSocket2_Berkley.cppvendors/mafianet/Source/src/RakNetSocket2_Windows_Linux.cppvendors/mafianet/Source/src/RakNetSocket2_Windows_Linux_360.cppvendors/mafianet/Source/src/RakNetStatistics.cppvendors/mafianet/Source/src/RakNetTransport2.cppvendors/mafianet/Source/src/RakNetTypes.cppvendors/mafianet/Source/src/RakPeer.cppvendors/mafianet/Source/src/RakSleep.cppvendors/mafianet/Source/src/RakString.cppvendors/mafianet/Source/src/RakThread.cppvendors/mafianet/Source/src/RakWString.cppvendors/mafianet/Source/src/Rand.cppvendors/mafianet/Source/src/RandSync.cppvendors/mafianet/Source/src/ReadyEvent.cppvendors/mafianet/Source/src/RelayPlugin.cppvendors/mafianet/Source/src/ReliabilityLayer.cppvendors/mafianet/Source/src/ReplicaManager3.cppvendors/mafianet/Source/src/Router2.cppvendors/mafianet/Source/src/SecureHandshake.cppvendors/mafianet/Source/src/SendToThread.cppvendors/mafianet/Source/src/SignaledEvent.cppvendors/mafianet/Source/src/SimpleMutex.cppvendors/mafianet/Source/src/SocketLayer.cppvendors/mafianet/Source/src/StatisticsHistory.cppvendors/mafianet/Source/src/StringCompressor.cppvendors/mafianet/Source/src/StringTable.cppvendors/mafianet/Source/src/SuperFastHash.cppvendors/mafianet/Source/src/TCPInterface.cppvendors/mafianet/Source/src/TableSerializer.cppvendors/mafianet/Source/src/TeamBalancer.cppvendors/mafianet/Source/src/TeamManager.cppvendors/mafianet/Source/src/TelnetTransport.cppvendors/mafianet/Source/src/ThreadsafePacketLogger.cppvendors/mafianet/Source/src/TwoWayAuthentication.cppvendors/mafianet/Source/src/UDPForwarder.cppvendors/mafianet/Source/src/UDPProxyClient.cppvendors/mafianet/Source/src/UDPProxyCoordinator.cppvendors/mafianet/Source/src/UDPProxyServer.cppvendors/mafianet/Source/src/VariableDeltaSerializer.cppvendors/mafianet/Source/src/VariableListDeltaTracker.cppvendors/mafianet/Source/src/VariadicSQLParser.cppvendors/mafianet/Source/src/VitaIncludes.cppvendors/mafianet/Source/src/WSAStartupSingleton.cppvendors/mafianet/Source/src/_FindFirst.cppvendors/mafianet/Source/src/crypto/cryptomanager.cppvendors/mafianet/Source/src/crypto/factory.cppvendors/mafianet/Source/src/crypto/fileencrypter.cppvendors/mafianet/Source/src/crypto/securestring.cppvendors/mafianet/Source/src/gettimeofday.cppvendors/mafianet/Source/src/guid_util.cppvendors/mafianet/Source/src/linux_adapter.cppvendors/mafianet/Source/src/osx_adapter.cppvendors/mafianet/VERSION.txt
💤 Files with no reviewable changes (236)
- vendors/mafianet/Source/include/mafianet/PS4Includes.h
- vendors/mafianet/LICENSE.md
- vendors/mafianet/Source/include/mafianet/PS3Includes.h
- vendors/mafianet/README.md
- vendors/mafianet/Source/src/PS4Includes.cpp
- vendors/mafianet/Source/include/mafianet/Rackspace.h
- vendors/mafianet/Source/include/mafianet/DS_HuffmanEncodingTreeNode.h
- vendors/mafianet/Source/include/mafianet/WindowsIncludes.h
- vendors/mafianet/Source/include/mafianet/Kbhit.h
- vendors/mafianet/Source/include/mafianet/defineoverrides.h
- vendors/mafianet/Source/include/mafianet/MTUSize.h
- vendors/mafianet/Source/include/mafianet/gettimeofday.h
- vendors/mafianet/Source/src/RakMemoryOverride.cpp
- vendors/mafianet/Source/include/mafianet/Base64Encoder.h
- vendors/mafianet/Source/include/mafianet/MessageIdentifiers.h
- vendors/mafianet/Source/include/mafianet/RefCountedObj.h
- vendors/mafianet/Source/include/mafianet/DS_RangeList.h
- vendors/mafianet/Source/include/mafianet/ReliabilityLayer.h
- vendors/mafianet/Source/include/mafianet/EpochTimeToString.h
- vendors/mafianet/Source/include/mafianet/SocketLayer.h
- vendors/mafianet/Source/include/mafianet/PacketFileLogger.h
- vendors/mafianet/Source/include/mafianet/VariadicSQLParser.h
- vendors/mafianet/Source/include/mafianet/UDPProxyCommon.h
- vendors/mafianet/Source/include/mafianet/Itoa.h
- vendors/mafianet/Source/include/mafianet/WSAStartupSingleton.h
- vendors/mafianet/Source/src/Gets.cpp
- vendors/mafianet/Source/include/mafianet/NativeTypes.h
- vendors/mafianet/Source/include/mafianet/LocklessTypes.h
- vendors/mafianet/Source/include/mafianet/SingleProducerConsumer.h
- vendors/mafianet/Source/include/mafianet/VirtualWorld.h
- vendors/mafianet/Source/include/mafianet/NativeFeatureIncludesOverrides.h
- vendors/mafianet/Source/include/mafianet/aliases.h
- vendors/mafianet/Source/src/FormatString.cpp
- vendors/mafianet/Source/include/mafianet/CCRakNetUDT.h
- vendors/mafianet/Source/src/Itoa.cpp
- vendors/mafianet/Source/include/mafianet/LinuxStrings.h
- vendors/mafianet/Source/include/mafianet/ThreadsafePacketLogger.h
- vendors/mafianet/Source/include/mafianet/FormatString.h
- vendors/mafianet/Source/include/mafianet/Gets.h
- vendors/mafianet/Source/include/mafianet/commandparser.h
- vendors/mafianet/Source/include/mafianet/DS_OrderedChannelHeap.h
- vendors/mafianet/Source/include/mafianet/FileOperations.h
- vendors/mafianet/Source/include/mafianet/Getche.h
- vendors/mafianet/Source/include/mafianet/NetworkIDObject.h
- vendors/mafianet/Source/include/mafianet/DS_HuffmanEncodingTree.h
- vendors/mafianet/Source/include/mafianet/DataCompressor.h
- vendors/mafianet/Source/include/mafianet/SimpleMutex.h
- vendors/mafianet/Source/include/mafianet/sleep.h
- vendors/mafianet/Source/include/mafianet/ConsoleServer.h
- vendors/mafianet/Source/src/PacketOutputWindowLogger.cpp
- vendors/mafianet/Source/include/mafianet/XBox360Includes.h
- vendors/mafianet/Source/include/mafianet/EmailSender.h
- vendors/mafianet/Source/include/mafianet/SimpleTCPServer.h
- vendors/mafianet/Source/src/Getche.cpp
- vendors/mafianet/Source/include/mafianet/crypto/ifileencrypter.h
- vendors/mafianet/Source/src/LocklessTypes.cpp
- vendors/mafianet/Source/include/mafianet/DS_QueueLinkedList.h
- vendors/mafianet/Source/src/PacketConsoleLogger.cpp
- vendors/mafianet/Source/include/mafianet/PointGridSectorizer.h
- vendors/mafianet/Source/include/mafianet/SuperFastHash.h
- vendors/mafianet/Source/include/mafianet/DS_ByteQueue.h
- vendors/mafianet/Source/include/mafianet/crypto/securestring.h
- vendors/mafianet/Source/include/mafianet/DS_HuffmanEncodingTreeFactory.h
- vendors/mafianet/Source/include/mafianet/wstring.h
- vendors/mafianet/Source/include/mafianet/_FindFirst.h
- vendors/mafianet/Source/include/mafianet/string.h
- vendors/mafianet/Source/include/mafianet/assert.h
- vendors/mafianet/Source/include/mafianet/SecureHandshake.h
- vendors/mafianet/Source/include/mafianet/crypto/factory.h
- vendors/mafianet/Source/include/mafianet/mafianet.h
- vendors/mafianet/Source/include/mafianet/FileListTransferCBInterface.h
- vendors/mafianet/Source/include/mafianet/TransportInterface.h
- vendors/mafianet/Source/include/mafianet/PacketConsoleLogger.h
- vendors/mafianet/Source/src/LinuxStrings.cpp
- vendors/mafianet/Source/include/mafianet/SocketIncludes.h
- vendors/mafianet/Source/include/mafianet/CloudServer.h
- vendors/mafianet/Source/src/IncrementalReadInterface.cpp
- vendors/mafianet/Source/src/EpochTimeToString.cpp
- vendors/mafianet/Source/src/DS_Table.cpp
- vendors/mafianet/Source/include/mafianet/peerinterface.h
- vendors/mafianet/Source/include/mafianet/IncrementalReadInterface.h
- vendors/mafianet/Source/include/mafianet/crypto/fileencrypter.h
- vendors/mafianet/Source/include/mafianet/DS_Heap.h
- vendors/mafianet/Source/include/mafianet/transport2.h
- vendors/mafianet/Source/include/mafianet/PacketOutputWindowLogger.h
- vendors/mafianet/Source/include/mafianet/GridSectorizer.h
- vendors/mafianet/Source/include/mafianet/guid_util.h
- vendors/mafianet/Source/include/mafianet/VirtualWorldReplica3.h
- vendors/mafianet/Source/include/mafianet/DS_WeightedGraph.h
- vendors/mafianet/Source/src/NetworkIDObject.cpp
- vendors/mafianet/Source/src/guid_util.cpp
- vendors/mafianet/Source/src/DynDNS.cpp
- vendors/mafianet/Source/include/mafianet/DirectoryDeltaTransfer.h
- vendors/mafianet/Source/src/DataCompressor.cpp
- vendors/mafianet/Source/src/DS_ByteQueue.cpp
- vendors/mafianet/Source/src/Base64Encoder.cpp
- vendors/mafianet/Source/src/RakNetCommandParser.cpp
- vendors/mafianet/Source/src/crypto/factory.cpp
- vendors/mafianet/Source/src/NatTypeDetectionClient.cpp
- vendors/mafianet/Source/src/Rackspace.cpp
- vendors/mafianet/CMakeLists.txt
- vendors/mafianet/Source/src/EmailSender.cpp
- vendors/mafianet/Source/src/PacketFileLogger.cpp
- vendors/mafianet/Source/include/mafianet/statistics.h
- vendors/mafianet/Source/include/mafianet/AutopatcherPatchContext.h
- vendors/mafianet/Source/include/mafianet/DS_Hash.h
- vendors/mafianet/Source/src/crypto/securestring.cpp
- vendors/mafianet/Source/include/mafianet/DS_Tree.h
- vendors/mafianet/Source/include/mafianet/ReplicaEnums.h
- vendors/mafianet/Source/include/mafianet/GetTime.h
- vendors/mafianet/Source/include/mafianet/DS_Multilist.h
- vendors/mafianet/Source/src/ConsoleServer.cpp
- vendors/mafianet/Source/include/mafianet/FileList.h
- vendors/mafianet/Source/include/mafianet/PeerHandle.h
- vendors/mafianet/Source/src/gettimeofday.cpp
- vendors/mafianet/Source/src/CCRakNetUDT.cpp
- vendors/mafianet/Source/include/mafianet/HTTPConnection.h
- vendors/mafianet/Source/src/CloudClient.cpp
- vendors/mafianet/Source/include/mafianet/TelnetTransport.h
- vendors/mafianet/Source/include/mafianet/InternalPacket.h
- vendors/mafianet/Source/include/mafianet/StringCompressor.h
- vendors/mafianet/Source/include/mafianet/DS_LinkedList.h
- vendors/mafianet/VERSION.txt
- vendors/mafianet/Source/src/PeerHandle.cpp
- vendors/mafianet/Source/include/mafianet/thread.h
- vendors/mafianet/Source/include/mafianet/VariableDeltaSerializer.h
- vendors/mafianet/Source/src/NetworkIDManager.cpp
- vendors/mafianet/Source/include/mafianet/RandSync.h
- vendors/mafianet/Source/include/mafianet/FileListNodeContext.h
- vendors/mafianet/Source/include/mafianet/alloca.h
- vendors/mafianet/Source/include/mafianet/FullyConnectedMesh2.h
- vendors/mafianet/Source/include/mafianet/Rand.h
- vendors/mafianet/Source/include/mafianet/Export.h
- vendors/mafianet/Source/include/mafianet/StringTable.h
- vendors/mafianet/Source/include/mafianet/peer.h
- vendors/mafianet/Source/include/mafianet/PacketPool.h
- vendors/mafianet/Source/include/mafianet/ConnectionGraph2.h
- vendors/mafianet/Source/include/mafianet/DS_BytePool.h
- vendors/mafianet/Source/src/RakNetSocket2_Windows_Linux.cpp
- vendors/mafianet/Source/include/mafianet/DynDNS.h
- vendors/mafianet/Source/src/NatTypeDetectionCommon.cpp
- vendors/mafianet/Source/include/mafianet/NetworkIDManager.h
- vendors/mafianet/Source/src/RakNetSocket.cpp
- vendors/mafianet/Source/include/mafianet/DS_Map.h
- vendors/mafianet/Source/include/mafianet/DS_Queue.h
- vendors/mafianet/Source/include/mafianet/PacketizedTCP.h
- vendors/mafianet/Source/src/LogCommandParser.cpp
- vendors/mafianet/Source/include/mafianet/VitaIncludes.h
- vendors/mafianet/Source/include/mafianet/CheckSum.h
- vendors/mafianet/Source/include/mafianet/UDPForwarder.h
- vendors/mafianet/Source/src/PluginInterface2.cpp
- vendors/mafianet/Source/src/CommandParserInterface.cpp
- vendors/mafianet/Source/include/mafianet/defines.h
- vendors/mafianet/Source/include/mafianet/DS_List.h
- vendors/mafianet/Source/src/CheckSum.cpp
- vendors/mafianet/Source/include/mafianet/LogCommandParser.h
- vendors/mafianet/Source/src/ConnectionGraph2.cpp
- vendors/mafianet/Source/src/GetTime.cpp
- vendors/mafianet/Source/include/mafianet/AutopatcherRepositoryInterface.h
- vendors/mafianet/Source/include/mafianet/RelayPlugin.h
- vendors/mafianet/Source/include/mafianet/DS_ThreadsafeAllocatingQueue.h
- vendors/mafianet/Source/include/mafianet/TwoWayAuthentication.h
- vendors/mafianet/Source/include/mafianet/DS_BinarySearchTree.h
- vendors/mafianet/Source/include/mafianet/PacketLogger.h
- vendors/mafianet/Source/include/mafianet/TeamManager.h
- vendors/mafianet/Source/include/mafianet/smartptr.h
- vendors/mafianet/Source/src/HTTPConnection.cpp
- vendors/mafianet/Source/src/DirectoryDeltaTransfer.cpp
- vendors/mafianet/Source/include/mafianet/MessageFilter.h
- vendors/mafianet/Source/include/mafianet/UDPProxyCoordinator.h
- vendors/mafianet/Source/src/DS_BytePool.cpp
- vendors/mafianet/Source/src/BitStream.cpp
- vendors/mafianet/Source/include/mafianet/UDPProxyClient.h
- vendors/mafianet/Source/src/crypto/fileencrypter.cpp
- vendors/mafianet/Source/include/mafianet/StatisticsHistory.h
- vendors/mafianet/Source/include/mafianet/TableSerializer.h
- vendors/mafianet/Source/src/CloudCommon.cpp
- vendors/mafianet/Source/include/mafianet/DS_OrderedList.h
- vendors/mafianet/Source/include/mafianet/PluginInterface2.h
- vendors/mafianet/Source/src/DS_HuffmanEncodingTree.cpp
- vendors/mafianet/Source/src/PointGridSectorizer.cpp
- vendors/mafianet/Source/include/mafianet/version.h
- vendors/mafianet/Source/src/FileList.cpp
- vendors/mafianet/Source/src/linux_adapter.cpp
- vendors/mafianet/Source/include/mafianet/DS_Table.h
- vendors/mafianet/Source/include/mafianet/FileListTransfer.h
- vendors/mafianet/Source/CMakeLists.txt
- vendors/mafianet/Source/src/RPC4Plugin.cpp
- vendors/mafianet/Source/include/mafianet/VariableListDeltaTracker.h
- vendors/mafianet/Source/include/mafianet/crypto/cryptomanager.h
- vendors/mafianet/Source/include/mafianet/Router2.h
- vendors/mafianet/Source/include/mafianet/memoryoverride.h
- vendors/mafianet/Source/include/mafianet/time.h
- vendors/mafianet/Source/src/RakNetSocket2_Berkley.cpp
- vendors/mafianet/Source/include/mafianet/DS_BPlusTree.h
- vendors/mafianet/Source/include/mafianet/SignaledEvent.h
- vendors/mafianet/Source/include/mafianet/ReadyEvent.h
- vendors/mafianet/Source/include/mafianet/types.h
- vendors/mafianet/Source/include/mafianet/CommandParserInterface.h
- vendors/mafianet/Source/include/mafianet/DR_SHA1.h
- vendors/mafianet/Source/include/mafianet/CloudCommon.h
- vendors/mafianet/Source/src/DR_SHA1.cpp
- vendors/mafianet/Source/src/osx_adapter.cpp
- vendors/mafianet/Source/src/GridSectorizer.cpp
- vendors/mafianet/Source/include/mafianet/ThreadPool.h
- vendors/mafianet/Source/include/mafianet/SendToThread.h
- vendors/mafianet/Source/include/mafianet/TCPInterface.h
- vendors/mafianet/Source/include/mafianet/TeamBalancer.h
- vendors/mafianet/Source/src/RakNetSocket2.cpp
- vendors/mafianet/Source/src/PacketizedTCP.cpp
- vendors/mafianet/Source/src/NatTypeDetectionServer.cpp
- vendors/mafianet/Source/src/NatPunchthroughServer.cpp
- vendors/mafianet/Source/include/mafianet/linux_adapter.h
- vendors/mafianet/Source/src/HTTPConnection2.cpp
- vendors/mafianet/Source/include/mafianet/PacketPriority.h
- vendors/mafianet/Source/include/mafianet/BitStream.h
- vendors/mafianet/Source/include/mafianet/SocketDefines.h
- vendors/mafianet/Source/include/mafianet/ReplicaManager3.h
- vendors/mafianet/Source/include/mafianet/CloudClient.h
- vendors/mafianet/Source/include/mafianet/HTTPConnection2.h
- vendors/mafianet/Source/src/NatPunchthroughClient.cpp
- vendors/mafianet/Source/src/CCRakNetSlidingWindow.cpp
- vendors/mafianet/Source/src/FileOperations.cpp
- vendors/mafianet/Source/include/mafianet/RPC4Plugin.h
- vendors/mafianet/Source/include/mafianet/CCRakNetSlidingWindow.h
- vendors/mafianet/Source/include/mafianet/UDPProxyServer.h
- vendors/mafianet/Source/src/FileListTransfer.cpp
- vendors/mafianet/Source/src/PacketLogger.cpp
- vendors/mafianet/Source/include/mafianet/DS_MemoryPool.h
- vendors/mafianet/Source/include/mafianet/EmptyHeader.h
- vendors/mafianet/Source/include/mafianet/osx_adapter.h
- vendors/mafianet/Source/include/mafianet/socket2.h
- vendors/mafianet/Source/src/CloudServer.cpp
- vendors/mafianet/Source/src/FullyConnectedMesh2.cpp
- vendors/mafianet/Source/src/MessageFilter.cpp
- vendors/mafianet/Source/include/mafianet/socket.h
MSVC-only compile failure: the mixer test declared `near` and `far` locals. Both are legacy macros from windows.h, so the names expanded to nothing and the declarations stopped parsing. Renamed. macOS and Linux were green, which is exactly why this needed a third platform to catch. Pin MafiaNet by commit rather than tag, and stop caching it. A tag is a mutable ref -- repointing it would change what every future build fetches while the pin file still reads the same. The CACHE entry was the worse half: a cached value survives in an existing build tree, so bumping the pin and rebuilding incrementally would silently keep fetching the old revision. GIT_SHALLOW is retained; the review suggested dropping it on the grounds that shallow clones cannot pin a detached commit, but that was verified against GitHub and works, so the fast clone is kept. Assert the relay format invariant in OnVoiceFrame. The dispatcher upstream identifies packets through GetPacketDataOffset(), which skips an ID_TIMESTAMP prefix, while the relay format is defined from byte 0 and cannot be parsed at any other offset. Checking the packet id where the frame is consumed makes the two layers agree explicitly instead of relying on MafiaNet's RelayFrame to reject the mismatch at a distance. Sync the spec and plan with what shipped. Both predate the fetched dependency, the relay format-version byte, the removal of the server-side recipient cap, and the RNNoise and loopback findings -- and the plan is what a separate Windows session will execute for the client half, so stale instructions there become real bugs. The plan now carries a status block marking the landed tasks historical, and its client-side steps are corrected: the encoder bitrate is set explicitly, SetNoiseFilter is not called, and the loopback verification is replaced, since self-origin frames are dropped in relay mode and that procedure could only ever have produced silence.
|
All addressed in Windows CI (not a review comment, but the actual blocker). The mixer test declared Immutable MafiaNet pin (Major) — adopted, partly on different grounds. The security framing doesn't quite hold: anyone who can pass I did not drop Relay-frame bounds vs packet offset (Minor) — adopted, with a different fix. The scenario is already blocked: MafiaNet's Documentation drift (several Major/Minor) — all fixed. These were the most useful findings in the set. The spec and plan predate the fetched dependency, the format-version byte, the removal of the server-side recipient cap, and the RNNoise and loopback findings. That matters more than usual because a separate Windows session will execute the plan's unfinished half verbatim, so stale instructions there become real bugs.
Two 182 tests / 15 modules / 0 failed, verified from a clean build tree rather than a warm one. |
ce31da5 to
22468e0
Compare
Windows link failure: LNK2038 on _ITERATOR_DEBUG_LEVEL and RuntimeLibrary, with MafiaNetStatic.lib built MDd_DynamicDebug against Framework objects built MD_DynamicRelease. FrameworkSetup forces CMAKE_MSVC_RUNTIME_LIBRARY to MultiThreadedDLL -- the release CRT, even in Debug builds, which CI uses. MafiaNet, Opus and RNNoise are each their own CMake project with their own project() call, so they do not pick that override up and default to MultiThreadedDebugDLL under a Debug configuration. This did not arise while MafiaNet was vendored: that copy was a bare add_library() with no project() of its own, so it simply inherited the parent scope. Fetching the real project is what surfaced it. Sets the property per target rather than relying on variable inheritance across a subproject boundary, so it does not depend on how each dependency establishes its scope.
The previous attempt read CMAKE_MSVC_RUNTIME_LIBRARY across the subproject boundary and had no effect on Windows. An empty value means "use the default", which is the MDd this is meant to avoid, so the value is now spelled out to match cmake/FrameworkSetup.cmake instead of being inherited. Adds temporary configure-time diagnostics reporting the inherited variable, CMAKE_CXX_FLAGS_DEBUG, and the property actually applied to each fetched target. Windows is the only platform that reproduces this and it cannot be tested locally, so the log is the only way to confirm the mechanism rather than guess at it again. To be removed once green.
CI diagnostics disproved the earlier theories: the parent CMAKE_MSVC_RUNTIME_LIBRARY inherits correctly as MultiThreadedDLL, and the MSVC_RUNTIME_LIBRARY property is applied to MafiaNetStatic, opus and rnnoise -- yet their objects still came out MDd_DynamicDebug. The property is therefore set but not honoured, meaning the debug CRT enters through the flags inside those subprojects' own scopes. Appends /MD as a compile option, which lands after CMAKE_<LANG>_FLAGS. For MSVC the last runtime switch wins, so this overrides the flag regardless of where it came from. Keeps the diagnostics for one more run, now including CMAKE_CXX_FLAGS_DEBUG read from MafiaNet's own directory scope -- the one value the previous round could not observe, and the one that should name the source. All diagnostics come out once Windows is green.
Root cause of the Windows link failure, found by reading MafiaNet's build rather than guessing at flags: Source/CMakeLists.txt does target_compile_definitions(... $<$<CONFIG:Debug>:_DEBUG>). Defining _DEBUG makes MSVC select debug CRT semantics in the object itself -- _ITERATOR_DEBUG_LEVEL becomes 2 and the object records MDd_DynamicDebug. Framework uses the RELEASE CRT even in Debug builds, so its objects are MD_DynamicRelease with _ITERATOR_DEBUG_LEVEL 0, and linking the two fails with LNK2038. No flag or MSVC_RUNTIME_LIBRARY property can override this, because the definition is what drives it. CI diagnostics showed the property applied correctly to every fetched target while the objects still came out MDd, which is what pointed at the definition. The fix drops _DEBUG on the fetched targets. This is Framework adapting to its own unusual CRT choice, not a defect upstream: MafiaNet is right to define _DEBUG when built normally. Nothing analogous was needed while MafiaNet was vendored, because that copy was a bare add_library() with no compile definitions of its own. Removes the temporary diagnostics; they have served their purpose.
The comment above major_paths says a directory entry covers everything beneath it and a file entry matches exactly, but the test was a bare prefix: "$file" == "$major"*. That also fires on siblings sharing the same leading characters -- cmake/MafiaNetPin.cmake.bak would trigger a major bump, as would a future networking/replication2. Matches exactly, or on a genuine path boundary. Applied to minor_paths too, which had the same test.
Lands M1 of voice chat: the server and shared half, and corrects how Framework consumes MafiaNet. Replaces #242, which vendored the dependencies into this repo — the wrong boundary, and the direct cause of its CI failure.
Clients encode Opus frames and send them to the server; the server decides who hears each frame and forwards the payload without ever decoding it. The server stays authoritative over who hears whom — a hacked client can't hear players it isn't allowed to, because it never receives their bytes — at roughly a memcpy per recipient instead of a codec.
Requires MafiaNet v0.13.0, which carries the relay protocol itself.
Two commits, two concerns
ff8e6c69— fetch MafiaNet instead of vendoring it. MafiaNet owns RakVoice and therefore owns RakVoice's Opus and RNNoise dependencies, which its own build already fetches. Vendoring a trimmed copy here meant hoisting those a level up: ~85 MB of third-party source, a re-vendor split across three trees that had to stay in lockstep, and a collision with.gitignore'svendors/**/*.cmakerule that silently excluded seven Opus CMake modules from the commit — enough to fail every CI configure while a warm local build tree kept working. Framework now links the exportedMafiaNet::MafiaNetStatic, whose PUBLIC includes replace the hand-rolled path into the vendored tree.8a87eae8— the voice feature.voice_config.hVoiceRouterSpscRingMixerVoiceServerThe version pin
cmake/MafiaNetPin.cmakeholds the pin as its own file, not an inlineGIT_TAG. MafiaNet's message-id enum is positional, so moving the pin can shift every id and break every peer built against the old header.bump_version.shclassifies a release by which paths changed, and with MafiaNet no longer in this tree a wire break has no path to detect — the pin file is that path. It lives incmake/specifically becausevendors/**/*.cmakewould have hidden it, which is the same rule that broke #242.This PR also repairs a dangling
major_pathsentry pointing atcode/framework/src/networking/messages, deleted long ago;replicationis where the sync flow lives now.Not here, deliberately
The client half — audio device, client pipeline, M2O integration.
FrameworkClientisWIN32-only, so none of it compiles on the machine this was built on, and landing it unbuilt would mean three tasks nobody could compile, let alone hear. One finding worth carrying into that work:SetLoopbackModeis a no-op in relay mode, because self-origin frames are dropped. Any codec-roundtrip check there needs two peers or a stub relay host — a self-loopback test will produce silence, and that is not evidence of a broken pipeline.Testing
182 tests / 15 modules / 0 failed, verified from a clean build tree rather than a warm one — that distinction is what #242 got wrong.
24 new across
voice_router,spsc_ringandvoice_mixer, each mutation-checked: inverting the local-mute condition, reversing the pan cross-product, and dropping the ring's reserved slot each make a test fail.SpscRingwas additionally verified under ThreadSanitizer with a validated negative control.VoiceServerhas no automated tests — it needs a liveRakPeerInterface— so its impersonation guard is unverified here. The equivalent parsing and impersonation checks are covered upstream by MafiaNet's own suite, which is one of the reasons the protocol belongs there.Notes for review
FetchContentin the build; everything else undervendors/stays vendored in-tree. That's the trade for the 85 MB.InstanceOptionsopt-out yet. Blast radius is bounded, but whether servers can disable it is an open API decision worth settling before M2.Summary by CodeRabbit
New Features
Bug Fixes
Tests