Facepunch / garrysmod-requests

Feature requests for Garry's Mod
83 stars 24 forks source link

Re-design the current voice system to use IGModAudioChannel. #647

Open mcd1992 opened 8 years ago

mcd1992 commented 8 years ago

As it currently stands the voice system in Garry's Mod is duct taped together. The PlayerCanHearPlayersVoice hook is inefficient and doesn't allow for any control over the 3D volume.

Ultimately what I'd like to see is the voice system switching to use IGModAudioChannel userdata which would allow a LOT more control over voice data. I'm not sure how difficult this task would be though as I've never looked at how source does voice data.

If this ever got looked into it would also be a good time to maybe switch the voice codec/quality as requested in #479. Another issue that would be solved by this is #511.

I even think this could be done and still remain backwards compatible with older voice related addons. If we make PlayerCanHearPlayersVoice still work as it currently does on the server it would allow the server to dictate who is receiving the voice data to be processed clientside. Then clientside we could add PlayerCanHearPlayersVoice with the same params and returns as the serverside hook but add a 3rd parameter that would be the talking player's IGModAudioChannel. That should allow for backwards compatibility while also allowing us to use the bass audio library on voice data.

This was an idea I had a while ago but never really brought up until PlayerCanHearPlayersVoice was being discussed in the next update thread. So I haven't really taken the time to thoroughly check this idea. Let me know if I'm an idiot and there's something just fundamentally wrong with this idea.

gspetrou commented 8 years ago

Dreams

Jvs34 commented 8 years ago

:rainbow: :rainbow: :rainbow:

Luabee commented 8 years ago

This is a beautiful idea.

AusHick commented 8 years ago

I requested this sooooooooo long ago. I would weep tears to see this actually happen.

aStonedPenguin commented 8 years ago

plz

Kogitsune commented 8 years ago

I had posted about something like this a year ago - https://facepunch.com/showthread.php?t=1374457&p=47115982&viewfull=1#post47115982

To me, if we were to have a channel approach, the ability to multicast the player's voice to different origins would be great, as well as the ability to apply DSP to their voice. To have player voice working over something like a breencast would be cool.

AusHick commented 8 years ago

Way back in the days of the Gmod13 betas, I suggested we look into the TeamSpeak 3 SDK for voice chat. It would solve most all of our problems, minus a relatively small license fee. But it would add immense depth to developers abilities with voice chat.

Plus it's already cross platform ready.

https://www.teamspeak.com/teamspeak3sdk On Feb 16, 2016 6:04 PM, "Kogitsune" notifications@github.com wrote:

I had posted about this a year ago - https://facepunch.com/showthread.php?t=1374457&p=47115982&viewfull=1#post47115982

To me, if we were to have a channel approach, the ability to multicast the player's voice to different origins would be great, as well as the ability to apply DSP to their voice. To have player voice working over something like a breencast would be cool.

— Reply to this email directly or view it on GitHub https://github.com/Facepunch/garrysmod-requests/issues/647#issuecomment-184911997 .

Kefta commented 8 years ago

Also, @Revenge282 it supports customisable 3D sound environments which is quite lovely

AusHick commented 8 years ago

Exactly. Even the positional audio in the regular TS3 client is amazing, implemented in engine would be spectacular. On Feb 16, 2016 6:54 PM, "code_gs" notifications@github.com wrote:

Also, @Revenge282 https://github.com/Revenge282 it supports customisable 3D sound environments which is quite lovely

— Reply to this email directly or view it on GitHub https://github.com/Facepunch/garrysmod-requests/issues/647#issuecomment-184930027 .

mcd1992 commented 8 years ago

One idea that was brought up in the glua chat (I believe it was Hobbes?) was just having a hook for voice data being received on the client. Then having a means of creating our own IGModAudioChannel and feeding the raw voice stream into it. This would let us create multiple channels for one voice, and would allow for something like a PA system where a player can broadcast a voice announcement through some loudspeakers or something. It would also open the potential for doing the same with sound.PlayURL and the likes.

mcd1992 commented 7 years ago

I see @willox assigned himself to a referenced issue regarding 3D distance/volume. Any update on if its worth moving to a IGModAudioChannel based system or if we should just add in the features we want to the current voice system?

Valafi commented 6 years ago

Everyone in my server refuses to use the in-game voice because of it's quality.

I don't understand why this hasn't been done yet. Voice chat is a key element of Garry's Mod gameplay.

ExtReMLapin commented 4 years ago

Can't garry hire a temp dev to do this ?

With this we could detect voice pitch and auto kick young players.

BadgerCode commented 4 years ago

Have there been any spikes or investigations around this?

There's often a few people in-game with microphones that are a bit too loud. It would be great if we could have Discord-style per-user volume controls.