Jump to content

Voice chat?


Guest SeySayux

Recommended Posts

Hi,

Does anyone know if a patch has been made to implement voice chat already? If not, is information available about how it works (so I may attempt to write a patch myself)? Or a packet analyzer, etc... ?

Status MaNGOS:

Second menu is named "Sound". No options for Voice chat

Status blizz:

Second menu is named "Sound & Voice". On the left hand side there's a second tab for Voice that allows you to configure voice chat.

Thanks,

- SeySayux

Link to comment
Share on other sites

Characterhandler.cpp

void WorldSession::HandlePlayerLogin(LoginQueryHolder *holder)

    data.Initialize(SMSG_FEATURE_SYSTEM_STATUS, 2);         // added in 2.2.0
   data << uint8(2);                                       // unknown value
   data << uint8(0);                                       // enable(1)/disable(0) voice chat interface in client
   SendPacket(&data);

You can enable/disable voice chat menu in client here.

Link to comment
Share on other sites

Voice chat isn't implemented. I don't think it's worth spedning time but if you insist then take a loot at old ascent's source code(rev 45xx I believe) and it's VC written by burlex(dunno if it ever worked, besides its pretty old) and mumble voip application.

It worked fine, I wonder why Mangos doesn't support it yet. I can talk to Burlex if you want :)

Link to comment
Share on other sites

Okay, let's start with making a scheme...

1) You talk -- okay, that's possible right now :P

2) Client registers speech through microphone -- that's client stuff (I don't know anything about hardware anyways)

3) Client sends through voice in some codec -- Which one (speex, or another such as ogg)? What kind of protocol? Is the protocol similar to the normal protocol or an entirely different one?

4) Server gets voice data -- that's where we kick in

5) Server descides which clients get voice data -- distance between client locations?

6) Voice data (loudness, ...) is modified according to relative position of clients. I guess this uses/could use OpenAL. Does this happen client-side (i.e. full voice data+location is send through) or server-side?

7) Voice data is send through -- again, protocol?

8) You can hear the voice if your speakers are turned up. -- client stuff again.

So the main problems now are 2), 6), and 7). I'd need more info about that before I can start hacking. If there's someone that knows about/has already tried implementing voice chat, I'd be nice if I could contact him/her.

- SeySayux

Link to comment
Share on other sites

On offy it doesn't check distance between speaking persons, so you can be in some chat channel and at different maps and you will hear each other. Same with raid, party & BG chats.

Also, client-integrated voice chat does not allow you to modify someone's voice (as Ventrilo does). So if someone's mic is very loud, every one will hear the same level of sound, only modified with general sound settings of target's client.

It's also worth mentioning that you will still hear the voice chat if you get disconnected from the server. (Didn't check mic though.)

Link to comment
Share on other sites

  • 5 weeks later...

I'd say you'd be halfway there if you can get points 4, 5 and 7 to work - if indeed the LordJZ is correct that you can enable it clientside with a few minor setting adjustments.

Trouble however is LordJZ's other remark: voicechat still works even when the server gets disconnected. This could indicate voicechat is routed on to an external voicechat server, which makes sense performance-wise but might be difficult to implement depending on how the client handles it (ie, can you just send the client a packet to connect to a voicechat server on a specific IP and port? And how does it know what channel you are in / who you can talk to?).

Would still be an awesome feature to have though :)

Link to comment
Share on other sites

How difficult simply depends on your skill level with C++ and sockets. I'd say your best bet would be to code it so the VoIP would use a seperate server, such as Mumble, Ventrilo, or TeamSpeak...depending on the preference of the server administrator. Although, Mumble is the only open-source voice chat client/server I know about, which may allow you to modify the server to work with whatever protocol and codec is used by the game client. I think the game clients use Vent as the basis for voice chat, don't they?

The real issue is operating a VoIP server for a large number of users requires quite a lot of bandwidth and resources, far more than your average server admin has available since they usually operate with an old spare PC and home broadband. You may be able to reliably support 20 users that way.

Link to comment
Share on other sites

There's most of opcodes used in voice chat, excluding voice chat server opcodes ofc...

[05.04.2010 16:11:13] <[TOM_RUS]> struct VoiceSessionMember

[05.04.2010 16:11:13] <[TOM_RUS]> {

[05.04.2010 16:11:13] <[TOM_RUS]> unsigned __int64 guid;

[05.04.2010 16:11:13] <[TOM_RUS]> unsigned __int8 index;

[05.04.2010 16:11:13] <[TOM_RUS]> char addressPort[32];

[05.04.2010 16:11:13] <[TOM_RUS]> unsigned __int8 flags;

[05.04.2010 16:11:13] <[TOM_RUS]> unsigned __int8 unk1;

[05.04.2010 16:11:13] <[TOM_RUS]> int unk2;

[05.04.2010 16:11:13] <[TOM_RUS]> };

[05.04.2010 16:17:42] <[TOM_RUS]> SMSG_VOICE_SESSION_ROSTER_UPDATE http://paste2.org/p/757601

[05.04.2010 16:21:48] <[TOM_RUS]> SMSG_VOICE_SESSION_LEAVE http://paste2.org/p/757607

[05.04.2010 16:24:31] <[TOM_RUS]> SMSG_VOICE_SET_TALKER_MUTED http://paste2.org/p/757609

[05.04.2010 16:26:03] <[TOM_RUS]> SMSG_VOICE_PARENTAL_CONTROLS http://paste2.org/p/757613

[05.04.2010 16:28:16] <[TOM_RUS]> SMSG_AVAILABLE_VOICE_CHANNEL http://paste2.org/p/757622

[05.04.2010 16:29:48] <[TOM_RUS]> SMSG_VOICE_SESSION_ADJUST_PRIORITY = 0x3A0, can't find

[05.04.2010 16:30:03] <[TOM_RUS]> CMSG_VOICE_SET_TALKER_MUTED_REQUEST = 0x3A1, can't find

[05.04.2010 16:31:11] <[TOM_RUS]> SMSG_VOICE_SET_TALKER_MUTED http://paste2.org/p/757626

[05.04.2010 16:32:53] <[TOM_RUS]> CMSG_VOICE_SESSION_ENABLE uint8 enableMic, uint8 enableVoiceChat

[05.04.2010 16:33:46] <[TOM_RUS]> SMSG_VOICE_SESSION_ENABLE = 0x3B0, can't find

[05.04.2010 16:34:59] <[TOM_RUS]> CMSG_CHANNEL_SILENCE_VOICE string channel, string name

[05.04.2010 16:36:24] <[TOM_RUS]> CMSG_CHANNEL_UNSILENCE_VOICE = 0x3CE, same as CMSG_CHANNEL_SILENCE_VOICE

[05.04.2010 16:37:42] <[TOM_RUS]> CMSG_SET_ACTIVE_VOICE_CHANNEL uint32 channelId, string channelname

[05.04.2010 16:38:38] <[TOM_RUS]> CMSG_CHANNEL_VOICE_ON string channelName

[05.04.2010 16:39:02] <[TOM_RUS]> CMSG_CHANNEL_VOICE_OFF string channelName

[05.04.2010 16:39:56] <[TOM_RUS]> CMSG_ADD_VOICE_IGNORE string name

[05.04.2010 16:40:07] <[TOM_RUS]> CMSG_DEL_VOICE_IGNORE uint64 guid

[05.04.2010 16:41:03] <[TOM_RUS]> SMSG_VOICE_CHAT_STATUS uint8

[05.04.2010 16:42:44] <[TOM_RUS]> SMSG_COMSAT_RECONNECT_TRY

[05.04.2010 16:42:51] <[TOM_RUS]> SMSG_COMSAT_DISCONNECT

[05.04.2010 16:42:58] <[TOM_RUS]> SMSG_COMSAT_CONNECT_FAIL

[05.04.2010 16:43:04] <[TOM_RUS]> SMSG_VOICESESSION_FULL

[05.04.2010 16:43:10] <[TOM_RUS]> those 4 are empty

[05.04.2010 16:52:00] <[TOM_RUS]> CMSG_CHANNEL_SILENCE_ALL string channel, string name

[05.04.2010 16:52:25] <[TOM_RUS]> CMSG_CHANNEL_UNSILENCE_ALL string channel, string name

Link to comment
Share on other sites

  • 1 month later...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use