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.Net (in microsoft.xna.framework.net.dll)

Syntax

public void EnableSendVoice (
         NetworkGamer remoteGamer,
         bool enable
)

Parameters

  • remoteGamer
    Type: NetworkGamer
    A remote gamer in the session.
  • enable
    Type: Boolean
    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 7, Windows Vista, Windows XP