Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio and voice client support #10

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

FiniteReality
Copy link
Member

@FiniteReality FiniteReality commented Nov 17, 2018

Opening this now for review and feedback. Right now, only the low-level clients are implemented, and UDP transmission/receiving is not complete.

Where possible, I tried to follow the approaches used elsewhere in Wumpus.Net. However, I came into some barriers:

  • The voice gateway does not support ETF or zlib-stream, so I have dropped those from its implementation
  • I have a feeling that my implementation isn't watertight. It connects and can retrieve a session description, but I'm sure that given adverse conditions it'll quickly fall apart.

In 3000445, I added voice send - though it is broken at the moment. I've compared packets and implementations between other libraries/bots, but I can't seem to notice any obvious difference so I'm not entirely sure what I've done wrong. This has since been fixed, and was a simple error on my part.

@FiniteReality FiniteReality changed the title [WIP] Audio and voice client support Audio and voice client support Nov 25, 2018
@FiniteReality
Copy link
Member Author

This should be ready for review now. Please let me know where I've made mistakes with allocations and the like - it would be great if we could reduce the amount of allocations to as low as possible here.

@Auralytical Auralytical self-requested a review November 29, 2018 19:26
src/Wumpus.Net.Audio/Sodium/SodiumPrimitives.cs Outdated Show resolved Hide resolved
src/Wumpus.Net.Audio/VoiceGatewayPayload.cs Outdated Show resolved Hide resolved
src/Wumpus.Net.Audio/VoiceGatewayPayload.cs Outdated Show resolved Hide resolved

public async Task SendAsync(uint ssrc, ushort sequence, uint samplePosition, ArraySegment<byte> audio, Memory<byte> secret, IPEndPoint endpoint = null)
{
// TODO: this only supports xsalsa20_poly1305_lite - should we support more?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What other formats are there?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only two others I know of are xsalsa20_poly1305 and xsalsa20_poly1305_suffix.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should support all 3 because IIRC not all voice servers support the new ones.

Thankfully this is mostly trivial.

@FiniteReality
Copy link
Member Author

FiniteReality commented Jan 17, 2019

I forgot to ask; should I implement voice receive in this PR, too? I'll apply the requested changes in a moment after I've finished some college assignments. 😛

EDIT: We discussed this on Discord, you said voice receive should be another PR

@FiniteReality
Copy link
Member Author

@RogueException Any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants