You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* create bindings project
* adjust structure
* spite misha
* integrate dave into audio client
* working send/receive audio with dave
* add doc section about libdave
* make voice api model internal
* add xml docs to new close codes
* document new voice op codes
* add xml docs to the libdave binding
* fix docs samples
* Update tools/Discord.Net.Dave/Utils.cs
Co-authored-by: Mihail Gribkov <61027276+Misha-133@users.noreply.github.com>
* cap. snake case -> pascal case for constants
* switch to hard cast of JToken
* add PATH to libdave docs
* ensure log sink isn't gc collected
* improve thread and memory safety
* rename constant to pascal case
* remove 'CChar' alias
* use ext. and add project imports
* add dave to gh workflow
* fix incorrect opcode for dave
* add logs for MLS failure
* add docs to libdave binding
* update to newer libdave api
* update to latest libdave
* update to latest libdave spec
* (mostly) working
* ok its fixed
* update libdave docs
* remove comments
* ensure previous dave sessions are cleaned
* readd set speaking call
* update log to be synchronous
* grammar
* return rented array to pool
* doc new streams and fix warning message
* Fix voice receive: wrong port in SelectProtocol + missing DAVE decrypt layer on early streams (#3241)
* Fix SelectProtocol sending local port instead of external port
The UDP discovery response from Discord contains the external IP and
port as seen by the voice server. SendSelectProtocol was passing
UdpPort (the local socket port) instead of the external port from
the discovery packet. Behind NAT, these differ, causing the voice
server to send audio to the wrong port.
Extract the external port from bytes 72-73 of the discovery response
and pass it to SendSelectProtocol alongside the external IP.
* Rebuild input streams after initial DAVE key exchange
When a user joins a voice channel, SocketGuild.RepopulateAudioStreamsAsync
fires StreamCreated before AudioClient.OnConnectingAsync initializes
the DaveSessionManager. This means input streams are created without
the DaveDecryptStream layer in the pipeline.
Once the MLS key exchange completes and the initial transition fires,
the encrypted audio reaches OpusDecodeStream directly — causing
InvalidPacket errors since the data is still DAVE-encrypted.
Add RebuildInputStreamsForDaveAsync to AudioClient which tears down
existing streams and recreates them with the DaveDecryptStream layer.
Call it from DaveSessionManager.PrepareProtocolTransitionAsync when
the initial transition (transitionId == InitTransitionId) completes.
* clean up some memory related things
* more memory related improvements
---------
Co-authored-by: Mihail Gribkov <61027276+Misha-133@users.noreply.github.com>
Co-authored-by: Th3B0Y <brunoamancio.ti@gmail.com>
You'll need a build of Discord's [libdave](https://github.com/discord/libdave) library as either `libdave.dll`, `libdave.so` or `libdave.o` in your apps executing directory or `PATH`. The library will resolve `libdave` and start using it automatically.
9
+
10
+
## Force enable/disable
11
+
12
+
You can opt-in/opt-out of libdave with the following config option:
13
+
14
+
[!code-csharp[Opt-in to libdave](samples/libdave_config.cs)]
15
+
16
+
### libdave Log Sink
17
+
18
+
By default, `libdave` writes its logs to standard output, you can override that by specifying a custom log sink:
0 commit comments