Sign in to follow this  
Wessley Mitchell

C# Voice Chat Doesn't Work

Recommended Posts

Posted (edited)

Hi.  I just started with Rage Multiplayer yesterday.  I've written my own resource in C#, and it works nicely.  Players can readily connect to my server, and synchronization looks good.

But I want to enable voice chat.  I've set server-files/conf.json > "voice-chat": true.  Settings > Voice Chat > Voice Volume doesn't bounce, which would seem to suggest it doesn't hear me.  Shouldn't this be responding to my voice?  I only have one microphone, and it is set correctly.  Voice Chat is enabled on this page.  Windows's various settings pages show the microphone meter bouncing when I talk.

When I hit F4, "Voice Chat State:  enabled" is displayed, but the other players in the session can't hear me nor can I hear them.

I'm using this plugin:

https://rage.mp/files/file/117-local-voice-chat-c/

Here's the server output upon starting server.exe:

Spoiler

Starting RAGE Multiplayer server...

[=========================================================]

        MaxPlayers:             1000
        Sync rate:              40ms
        Name:                   RAGE:MP Unofficial server
        Gamemode:               freeroam
        Streaming distance:     500
        Announcement:           disabled
        Voice chat:             enabled
        Address:                127.0.0.1:22005
        Connection limits:      disabled
        Encryption:             disabled
        NodeJS:                 enabled
        C#:                     enabled

[=========================================================]


[N] Starting network... - OK: (IPv4-only) at 127.0.0.1:22005
(node:20472) ExperimentalWarning: The ESM module loader is experimental.
Loading packages
        "local-chat" loaded
Initializing bridge (0.3.7.0)..
Initializing Bootstrapper.dll (0.3.7.0)..
-> SERVER STARTED AT 5/9/2019 8:29:53 PM
ACLEnabled: True
Loaded 451 entries from vehicleData.json
Loading resources..
-> Starting admin resource..
admin: loading scripts.. found 1 script(s)
admin: compiling scripts..
admin: instantiating Main.AdminScript..
admin: loading server events.. found 2 server event(s)
admin: loaded 2 server events(s)
admin: loading commands.. found 9 command(s)
admin: loaded 9 commands(s)
-> Resource admin started!
-> Starting welcomemessages resource..
welcomemessages: loading scripts.. found 1 script(s)
welcomemessages: compiling scripts..
welcomemessages: instantiating WelcomeMessages..
welcomemessages: loading server events.. found 2 server event(s)
welcomemessages: loaded 2 server events(s)
-> Resource welcomemessages started!
Started! Waiting for connections..
[P] Plugin bridge.dll loaded!
Started HTTP server at 22006 port.

 

Edited by Wessley Mitchell

Share this post


Link to post
Share on other sites

I've updated my above post.  I was originally having problems with both the JavaScript and C# versions of the above plugin.  I got the JavaScript one to work, but I'm having trouble with the C# one.  I appreciate any knowledge from someone with experience with the C# version.  Thank you.

Share this post


Link to post
Share on other sites

I was able to debug this, I think.  Please see this file, which is a modified version of the .cs file from the plugin in my original post:

https://1drv.ms/u/s!AvTC3qfYkjI9mq5_5u6SpiHbOpIa8Q

I want to highlight this line:

Quote

Notify(DateTime.UtcNow.ToString() + ":  Entities.Players.Streamed.Count:  " + Entities.Players.Streamed.Count.ToString());

When players spawn in close proximity, all players see "Entities.Players.Streamed.Count:  0."  So it seems to me that Rage Multiplayer is not updating its Entities.Players.Streamed list when players come in range.

Can someone shed some light on how to make Entities.Players.Streamed behave properly?

(I use "DateTime.UtcNow.ToString()" in the code to provide uniqueness so that messages will replace each other.  I've seen identical messages not push each other out of the way in the bottom left corner.  For example, this plugin writes, "Voice Chat State:  enabled/disabled," but pushing F4 multiple times quickly will trigger "Voice Chat State: enabled" and "Voice Chat State: disabled" only once.  After that, you need to wait for them to disappear from the bottom left before you can trigger them again.)

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.