Coder Social home page Coder Social logo

Comments (21)

ikbencasdoei avatar ikbencasdoei commented on June 1, 2024 2

Yes. I will update the plugin to make it easier.

from godot-voip.

ikbencasdoei avatar ikbencasdoei commented on June 1, 2024 1

Yes. Because a VoipInstance only has space for one input at a time, the audio gets weird when it gets multiple inputs. The solution is creating a new VoipInstance for every connection to your server.

from godot-voip.

ikbencasdoei avatar ikbencasdoei commented on June 1, 2024 1

Should be completely fine

from godot-voip.

ikbencasdoei avatar ikbencasdoei commented on June 1, 2024 1

I think this might be a performance issue (not your computers fault of course). I'll have to investigate further.

from godot-voip.

ikbencasdoei avatar ikbencasdoei commented on June 1, 2024 1

At this moment I'm not sure.

from godot-voip.

ikbencasdoei avatar ikbencasdoei commented on June 1, 2024

No threads required! I don't think think Godot even allows multiple threads to play sound.
I think this problem is solved by giving each participant a seperate voip instance. This way (hopefully) they'll use their seperate audio buffers.

from godot-voip.

Gamemap avatar Gamemap commented on June 1, 2024

I have 3 instances (on diffrent pc's) connected to a server and when 2 or more speak, the sound is not clear.
(So when a program receives 2 (or more) voice signals, the sound is stretched, delayed and choppy.)
I do not know if it is because of how the sound is processed.

from godot-voip.

Gamemap avatar Gamemap commented on June 1, 2024

Thanks, I will try to implement this, but I think it would be helpful for others to have some instructions or a hint in the readme/description.

Edit:
Must each client also have a VoipInstance for each connection?
Is the Multiplayer_PlayerID a good solution to sort the diffrent signals to the diffrent VoipInstances?

from godot-voip.

Gamemap avatar Gamemap commented on June 1, 2024

Thank you

from godot-voip.

ikbencasdoei avatar ikbencasdoei commented on June 1, 2024

Okay I made some changes which make it possible to receive multiple inputs with a single instance.

from godot-voip.

Gamemap avatar Gamemap commented on June 1, 2024

I think it is working. Thank you.

from godot-voip.

Gamemap avatar Gamemap commented on June 1, 2024

@casbrugman If I connect 10 voice programs to a server (and they all speak) the sound is weird again. This can probably only be fixed with a new voip instance. Could you help me figure out how to connect the incoming connections ID's to a new voip instance?
(I'm testing it alone, but if 10 people are talking, it must be a mess ;) but if too many people have background noise, it would probably lag).

With 8 connections the sound is really great now!

from godot-voip.

ikbencasdoei avatar ikbencasdoei commented on June 1, 2024

Could you explain in what way the sound is weird?

from godot-voip.

Gamemap avatar Gamemap commented on June 1, 2024

It's stretched, delayed and choppy. (like the first time, but now only for about 9+ connections).

from godot-voip.

Gamemap avatar Gamemap commented on June 1, 2024

@casbrugman To test multible connections alone I have changed the signal to button_toggled:

func _on_Voice_toggled(button_pressed):
    if button_pressed:
	    voice.recording = true
    else:
	    voice.recording = false

Could this be a problem? (Too many programms that want a microphone signal?)

from godot-voip.

ikbencasdoei avatar ikbencasdoei commented on June 1, 2024

@casbrugman If I connect 10 voice programs to a server (and they all speak) the sound is weird again. This can probably only be fixed with a new voip instance. Could you help me figure out how to connect the incoming connections ID's to a new voip instance?
(I'm testing it alone, but if 10 people are talking, it must be a mess ;) but if too many people have background noise, it would probably lag).

With 8 connections the sound is really great now!

Like you would when making an online game. For every player you spawn an instance and let each player control their own. However, if you are not familiar with making multiplayer games, it can be quite complex.

from godot-voip.

Gamemap avatar Gamemap commented on June 1, 2024

Thank you. I think I have an idea to connect the players with the instances. I will try it out in the next few days. Do you think this could solve the problem?

from godot-voip.

ikbencasdoei avatar ikbencasdoei commented on June 1, 2024

Like you would when making an online game. For every player you spawn an instance and let each player control their own. However, if you are not familiar with making multiplayer games, it can be quite complex.

Added a new VoiceOrchestrator node which works the same as the VoiceInstance but automatically does this^ but with much improved performance.

from godot-voip.

ikbencasdoei avatar ikbencasdoei commented on June 1, 2024

At the moment I think this is as good as it gets. Closing for now.

from godot-voip.

Gamemap avatar Gamemap commented on June 1, 2024

@c-as
I tested it on a PC and it worked beautifully until my CPU was at 100% because of all the input with all the programs open.
I will test it on several devices soon, but I think it will work perfectly.

Thank you for making this great and helpful addon.
Gamemap

from godot-voip.

ikbencasdoei avatar ikbencasdoei commented on June 1, 2024

Thank you, that's very good to hear.

from godot-voip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.