XNA Creators Club Online
Page 1 of 1 (6 items)
Sort Posts: Previous Next

LocalNetworkGamer.EnableSendVoice() does not work :-)

Last post 04-15-2008 12:05 PM by Shawn Hargreaves. 5 replies.
  • 04-11-2008 9:21 AM

    LocalNetworkGamer.EnableSendVoice() does not work :-)

    Hello everyone!

    I have a problem with EnableSendVoice() to mute some players using Gui. Simply speaking this method does not work for me...

    First of all, I did not find any tutorial where this method actually used..

    Second, I maintain my NetworkSession manually (without adding  to Game.Services and Game.Components anything)...

    Third, using reflector, I look up into the XNA framework, but did not understand where this internal messages are proccessed. As I see, Gamer.IsReady is almost working in the same manner as EnableSendVoice...

    Please, help me to find out what is the problem. BTW, other part of networking is just working fine... Well, it works as expected :-)

    Thanks!

  • 04-11-2008 11:40 AM In reply to

    Re: LocalNetworkGamer.EnableSendVoice() does not work :-)

    Can you post some code to show more details of how you are using this? Or even better, a full repro app that we could run to see the problem?

    That method works for me, at least in my unit tests, so I'll need more details to figure out the problem.
    XNA Framework Developer - blog - homepage
  • 04-12-2008 4:11 AM In reply to

    Re: LocalNetworkGamer.EnableSendVoice() does not work :-)

    Well, Shawn, unfortunatly I can not post the whole game (it takes about 150 megabyts), here is the piece of code:

    private void EnableSendVoice(int index, bool value)

    {

    NetworkSession session = GuiAPI.Game.NetworkSession;

    if (session != null)

    {

    LocalNetworkGamer gamer = session.LocalGamers[0];

    NetworkGamer remoteGamer = SlotToGamer(index);

    gamer.EnableSendVoice(remoteGamer, value);

    }

    }

    I am calling this method while NetworkSessionState is Lobby... All gamers are valid... This is strange because the game intensively uses network and all work fine... I am tried to figure out where is internal member NetworkSession.UserPacketBuffer is processed but did not find..

    BTW, Shawn, could you post please example of actual using this method... I did not find any example of using this method over many XNA samples....

    Thanks!

    Regards, Alex

  • 04-14-2008 12:59 PM In reply to

    Re: LocalNetworkGamer.EnableSendVoice() does not work :-)

    That code looks ok to me. There shouldn't be anything special about this method: it "just works" without having to do anything crazy in our internal tests for instance.

    So what happens when you call this? An exception? Do you just continue to hear voice through the headset even from the player that should now be disabled?
    XNA Framework Developer - blog - homepage
  • 04-15-2008 7:55 AM In reply to

    Re: LocalNetworkGamer.EnableSendVoice() does not work :-)

    There is no any exception :-)

    Just nothing happens and NetworkGamer.IsMutedByLocal did not change its state (always false)...

    Yes, Shawn, the sound is continued to recive from that player and to send to that player...

  • 04-15-2008 12:05 PM In reply to

    Re: LocalNetworkGamer.EnableSendVoice() does not work :-)

    The IsMutedByLocalPlayer property reports the player-controlled mute state, which they set using the Guide and which is persisted across reboots and between different Live games. That's the thing they use if a player is being offensive or obnoxious, and which games normally indicate by showing a mute icon next to the muted player.

    The EnableSendVoice method just controls local voice routing within the current title, and will not affect the IsMutedByLocalPlayer state. It should prevent you actually hearing any voice, though!
    XNA Framework Developer - blog - homepage
Page 1 of 1 (6 items) Previous Next
var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
DCSIMG