BananaHemic / Mumble-Unity

Performant Mumble Client For Unity3D
MIT License
77 stars 29 forks source link

Shout/Whisper to channel support #19

Open ict-ryahata opened 5 years ago

ict-ryahata commented 5 years ago

It looks like the TargettedSpeech struct does support a SpeechTarget to shout/whipser to channel. I have a few questions regarding it.

  1. I assume if you set the SpeechTarget = 1 (WhisperToChannel), then the TargetId is the channel ID you want to whisper to. Is that correct?

  2. How/what do I set so that a whisper to channel does not get propagated to linked channels? There is a way to do this in mumble when you assign a shortcut and I was wondering how I would do that with the TargettedSpeech struct.

  3. I'll keep digging to find the answer to this but just in case you answer this before I find it: Does your library support listing the channels so I can build a channel name to ID map?

Thanks!

BananaHemic commented 5 years ago

1/2. Whisper isn't integrated fully yet, but if you'd like to put it in, you can check out ManageAudioSendBuffer line 122.

  1. Currently there isn't, but it'd be very easy to add a getter for "Channels" in MumbleClient and delegates for when channels are added/removed from the server
ict-ryahata commented 5 years ago

When you say:

Whisper isn't integrated fully yet, but if you'd like to put it in, you can check out ManageAudioSendBuffer line 122.

I assume you're referring to this: //originally [type = codec_type_id << 5 | whistep_chanel_id]. now we can talk only to normal chanel

I haven't taken a deep dive on the Mumble source yet. Is there documentation for their audio packets?

BananaHemic commented 5 years ago

That is correct, you can see the documentation on packet format here: https://media.readthedocs.org/pdf/mumble-protocol/latest/mumble-protocol.pdf

ict-ryahata commented 5 years ago

Thanks a lot! I really appreciate your quick responses.

dburongarcia commented 4 years ago

Hi, I wonder if you are planning to add whisper/shout to channels and users? Has anyone tried to add it?

BananaHemic commented 4 years ago

I'm no longer adding features to this asset, but it really would be easy to add whisper/shout support

dburongarcia commented 3 years ago

Hello @BananaHemic, I asked too about whispering to users here #45 and I know it's related, but I'm not sure if it would be the same for both cases (users and channels) and I wonder how to get the voice target ids for both, to add it to the type byte for the finalPacket[0] in ManageAudioSendBuffer.cs Any tips? Thank you.

BananaHemic commented 3 years ago

@dburongarcia You'd need to look at the mumble documentation. Whispering is basically the same for user and channel, to get the IDs you have to implement the VoiceTargets packet