Closed ghost closed 8 years ago
Audio shouldn't work under 1.0 at all right now; it's still heavily work-in-progress.
Well, it's a shock that I got as far as I did in the first place then. I'll see if I can hack onto it to get it working on my end.
I rewrote the libsodium stuff and it doesn't seem to segfault anymore. I also found a bug in my code which would overflow the buffer of the RTPWriteStream, which I fixed. At this point, receiving audio works just fine (I see the speaker updates; they still need to be handled) but sending doesn't. Chances are it's something with the format which I'll have to look into.
Haha, I hacked the audio code together before heading off to a convention a couple weeks ago. I'm honestly amazed it works at all.
After our discussion in Discord earlier, it looks like this is solved now.
I'm using the dev branch of Discord.Net (latest commit) with a few additions to allow
CachedVoiceChannel.ConnectAsync
to work (basically adding an event, a listener to that event, and a TaskCompletionSource to await) and I'm encountering some issues with sending an Opus-encoded file.What happens is my application exits unexpectedly (no error message; status code appears indicative of a segfault, but gdb doesn't detect anything) and I'm not entirely sure why. Since I'm bypassing the Opus encoding, I think there's an issue with the current implementation of SecretBox which causes the segfault, but I'm not sure how to fix it.
I'm running my application on Debian 8.5, using dotnet 1.0.1-preview2-003121, and the code I'm using to create the AudioClient and feed data to it can be found here.