Allow canceling voice transmissions
Created by: cankaratepe23
Summary
Outgoing VoiceNext transmissions should be cancellable.
Details
I tried killing the ffmpeg process, flushing and disposing the transmission stream but the only half-working solution I could find was disconnecting and reconnecting the bot from the voice channel; but we need a better way to interrupt the playback and clear the stream.
Notes
Not sure if these are related but I've noticed, as the audio files get bigger, more and more memory is used and not freed by the GC even after playback is complete and the bot is disconnected from the voice channel. I played around with dotMemory a bit and noticed after disconnecting (disposing the connection) and reconnecting a few times, multiple instances of VoiceNextConnection show up in the memory snapshot, not even sure if this is unintended behaviour..