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

Voice Chat support #668

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

Voice Chat support #668

wants to merge 4 commits into from

Conversation

celguar
Copy link
Contributor

@celguar celguar commented Apr 8, 2024

🍰 Voice Chat

Info

  • Adds Voice Chat handlers/manager to the core and a separate Voice Chat server that handles voice exchange

What is Voice Chat

Core changes

  • (Re)Connection to voice chat server
  • Add most related opcode handlers
  • Automatically create group/raid/bg channels server side
  • Custom channel voice is enabled when someone with voice chat enabled joins it (found it here https://www.youtube.com/watch?v=h5oH4ER2cJ0)
  • Group/Raid/BG leaders & channel owners can mute others in channel, though it doesn't persist if someone leaves channel e.g. relogs
  • Can mute other players, works similar to ignore, but blocks only voice of that player. Ignoring other player blocks both chat and voice.

VoiceChat server

  • Is a separate app that handles UDP voice packets from the game (basically just sends them unchanged to other active members of the voice channel)
  • Is added using cmake FetchContent from here https://github.com/celguar/voicechat-server
  • Is the one made by Ascent Team (specifically, by Burlex) back in 2007-08, just with couple opcodes added and CmakeLists.txt https://github.com/SkyFire/ascent_classic/tree/master/src/ascent-voicechat
  • Can be on a separate host, but requires a TCP connection to world server and a UDP connection for users to connect. Ports are configurable
  • Builds on Windows and Linux, but I think it doesn't support -c parameter for config file so probably uses current directory when you start it

Demonstration

Todo / Checklist

I don't expect this PR to be merged anytime soon, just made it because I did what I could at this point and want to share

  • Might need to wait for realm/server manager implemenation by Cyberium, it should have a better AsyncConnector code with DNS support
  • Maybe it's better to make our own c/c++ based VoiceChat server from scratch instead of using a modified Ascent Team one (though it builds/runs/works on both Windows and Linux, and I don't know how to do it so didn't consider it)
  • SMSG_VOICE_ROSTER_UPDATE sends encryption key that I didn't try to figure out. So now it just remains uint8[16] and 0x00
  • Most people I asked were interested in proximity voice chat, I didn't try to do it. If tbc+ server can force join player to a custom chat channel, maybe it's possible, but voice codec is proprietary and I don't know a way to alter the volume for a better distance effect, also voice chat is probably mono sound.

- Group/raid/bg channels are added automatically
- Custom channels are added when someone with voice chat enabled joins it or by right click in chat UI
- Group leaders/Channel owners can mute others in channel, though it doesn't persist if someone leaves channel e.g. relogs
- Can mute other players similar to ignore
- VoiceChat server is a separate app that receives/sends voice UDP packets from clients
- VoiceChat server is the one made by Ascent developers, just with couple new opcodes
- VoiceChat server is fetched by cmake from celguar/voicechat-server
- There is support for reconnecting to voice server while server is running
@al3xc1985
Copy link

wow, just WOW

@betayi
Copy link

betayi commented Apr 12, 2024

amazing!

@killerwife
Copy link
Contributor

I just want to make sure you know, me and cyberium talked about merging this and we kinda agree it should be merged, but it will require the attention of one of us. I do not want to make any promises, however once I am done processing my tbc data I gathered, I will look at it. (estimating 2-3 months from now)

Obviously if someone else picks it up and reviews/fixes any design issues, no problem there. I just kinda swamped myself with the whole wotlk going away.

flags_unk = 0x80;
}

ObjectGuid m_guid;
Copy link

Choose a reason for hiding this comment

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

Client names are MemberGUID, NetworkId, Flags and for unk it's Priority

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please elaborate

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.

5 participants