It was a sunny afternoon, and I was trying to make another Discord audio bot, with my favourite C# and dotnet.
The feature set is simple: automatic volume between songs, some additional audio sources like Bilibili and Netease Music, and some features I want but can't recall now. And Discord.Net is the library to use.
Automatic volume adjusting between songs requires some magic on raw audio samples, so I decided to make my own decoding facilities, instead of passing PCM bits to AudioClient by shell executing FFmpeg as suggested in their guide. An FFmpeg library binding is developed to support this.
Thanks to macOS or something else, voice-related features just don't work on my machines, as stated in the issue https://github.com/discord-net/Discord.Net/issues/2275. I ended up making my own Opus encoding and sending encoded packets with my own timing control through RTP connections.
It was a sunny afternoon, and I was trying to make another Discord audio bot, with my favourite C# and dotnet.
The feature set is simple: automatic volume between songs, some additional audio sources like Bilibili and Netease Music, and some features I want but can't recall now. And Discord.Net is the library to use.
Automatic volume adjusting between songs requires some magic on raw audio samples, so I decided to make my own decoding facilities, instead of passing PCM bits to AudioClient by shell executing FFmpeg as suggested in their guide. An FFmpeg library binding is developed to support this.
Thanks to macOS or something else, voice-related features just don't work on my machines, as stated in the issue https://github.com/discord-net/Discord.Net/issues/2275. I ended up making my own Opus encoding and sending encoded packets with my own timing control through RTP connections.