LocalNetworkGamer.EnableSendVoice Method
Specifies whether voice data should be sent to, or received from, the specified remote gamer.
Namespace: Microsoft.Xna.Framework.Net
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)
Syntax
public void EnableSendVoice (
NetworkGamer remoteGamer,
bool enable
)
Parameters
- remoteGamer
A remote gamer in the session. - enable
true if voice is enabled; false otherwise.
Exceptions
Exception type | Condition |
---|---|
ArgumentException | This NetworkGamer belongs to a different network session. |
ArgumentNullException | remoteGamer is null. |
ObjectDisposedException | This NetworkGamer is no longer valid. The gamer may have left the session. |
Remarks
Call this method for local gamer instances only.
By default, voice is enabled for all gamers. However, you can selectively turn it off to enable features such as team chat. Also, you can dynamically turn it on or off, depending on the player's location in the game world, to achieve a proximity voice effect.
See Also
Reference
GamerPrivileges.AllowCommunication Property
LocalNetworkGamer Class
LocalNetworkGamer Members
Microsoft.Xna.Framework.Net Namespace
Platforms
Xbox 360, Windows XP SP2, Windows Vista, Zune