mtasa-blue icon indicating copy to clipboard operation
mtasa-blue copied to clipboard

Voice system improvements

Open oaojmiguel opened this issue 7 years ago • 14 comments

Is your feature request related to a problem? Please describe.

  • [ ] An excellent new feature for RP servers is the ability to check if a player has a mic plugged in (to show a custom icon or not). In my case, I'll display a mic icon (or not) besides the player's name.
  • [x] Another excellent feature for RP servers is the ability to change the voice volume for each player based in a distance given. In doing this, we can implement the proximity voice chat system and some other cool stuffs.
  • [x] Fix voice crashing and bugging out

Describe the solution you'd like Enable both features or create them.

Mantis: https://bugs.mtasa.com/view.php?id=7168

oaojmiguel avatar Aug 18 '18 18:08 oaojmiguel

Sounds reasonable. Please can you split this into two separate issues? Thanks!

qaisjp avatar Aug 18 '18 20:08 qaisjp

I already created 3D voice but it was complete garbage because of how silent MTA voice chat is (we might just delete voice entirely)

Einheit-101 avatar Aug 18 '18 23:08 Einheit-101

I’m pretty sure the second point is already implemented; setSoundVolume takes a player or sound element (this extends to most, if not all, sound-related functions) so you can interpolate the volume based on 3D distance.

And indeed, the voice chat is very quiet for some reason.

Addlibs avatar Aug 18 '18 23:08 Addlibs

I don't know if it's only for me, but activating the voice chat sometimes crashes the client. I used the default voice resource so I don't think that was the problem, but i don't have any more information or idea why this happends.

And yes, the voice chat is really quiet.

PlatinMTA avatar Aug 19 '18 00:08 PlatinMTA

@PlatinMTA that also happened to me and all of my friends, activating the voice chat sometimes crashes the client, so it's not only you that's having this problem.

fusiion avatar Aug 25 '18 15:08 fusiion

Voice freezing the client has been fixed in 39c1ba00ae122f0393cf5f185033b17c10b392da

botder avatar Jan 04 '19 01:01 botder

It would be nice if someone could work a little update to fix the voice sound issue.

PlatinMTA avatar Dec 12 '19 15:12 PlatinMTA

It would be nice if someone could work a little update to fix the voice sound issue.

I think it's better to wait with individual improvement points until @Jusonex is done working on PR #895 which can solve multiple issues at once and offer new possibilities.

Besides that, possibly due to a combination of 39c1ba0 and various BASS library updates (or other unknown changes) over the past year, apart from the freezes we haven't observed a voice-related crash in crash stats for a long time. Although that may be a result of servers barely using it due to its reputation as unreliable and bad.

Dutchman101 avatar Dec 12 '19 21:12 Dutchman101

I think it's better to wait with individual improvement points until @Jusonex is done working on PR #895 which can solve multiple issues at once and offer new possibilities.

Besides that, possibly due to a combination of 39c1ba0 and various BASS library updates (or other unknown changes) over the past year, apart from the freezes we haven't observed a voice-related crash in crash stats for a long time. Although that may be a result of servers barely using it due to its reputation as unreliable and bad.

I can assure you the crashes stopped when the update rolled up (at least none of my users crashed again for no apparent reason). I was asking cuz I'm working on a server that uses the voice system (TTT), but because it is really, really quiet and, as far as I know, you can't turn up the volume via resource some of my users can't really hear anything the other players are saying, so most of them use discord as an alternative, but this creates some problems.

I didn't search the code about the issue, but I guess it isn't that hard to just turn up a lil bit the volume, we already have an voice slider on the audio configuration anyway. Maybe I'm wrong, I don't really know.

At the state the voice is right now, yes, it can be used, it does not crash but some players can't hear anything, and that kinda sucks.

PlatinMTA avatar Dec 13 '19 14:12 PlatinMTA

I was asking cuz I'm working on a server that uses the voice system (TTT), but because it is really, really quiet and, as far as I know, you can't turn up the volume via resource some of my users can't really hear anything the other players are saying, so most of them use discord as an alternative, but this creates some problems.

I didn't search the code about the issue, but I guess it isn't that hard to just turn up a lil bit the volume, we already have an voice slider on the audio configuration anyway. Maybe I'm wrong, I don't really know.

I see now.. if we can't expect the voice overhaul anytime soon, I would agree it's worth looking into the sound volume issue for who uses it in the meanwhile.

Dutchman101 avatar Dec 13 '19 16:12 Dutchman101

Principally I would say it should wait on #895, but practically I don't think it's going to happen anytime soon, and it's not worth waiting for it. Also, these features don't seem too difficult to implement.

  • checking if a player has a mic plugged in can be achieved in a few different ways, and it's important to get the API for this right.

    It would be good if someone could do some research on how an API for this is achieved in other games or SDKs

  • I don't think this is valid anymore, because setSoundVolume takes a player argument:

    Another excellent feature for RP servers is the ability to change the voice volume for each player based in a distance given. In doing this, we can implement the proximity voice chat system and some other cool stuffs.

    Is the author satisfied with this outcome? It's not clear what else you're looking for here.

  • "quiet voice" - this might be because human hearing in real life is not linear, it's logarithmic.

    BASS_ChannelSetAttribute / BASS_ATTRIB_VOL has support for a BASS_SLIDE_LOG option, which is interesting!

    I can't find BASS_SLIDE_LOG anywhere in our code, so I suspect we're doing audio scaling very wrong right now.

qaisjp avatar Dec 14 '19 02:12 qaisjp

I implemented proximity voice long ago and removed it a week later, you cant even hear something when the player is close to you and it gets worse when they move a few meters.

Einheit-101 avatar Dec 14 '19 12:12 Einheit-101

setSoundVolume kinda fixes the issue, however i needed to put like 6.0 so players can really listen to each other well.

PlatinMTA avatar Dec 14 '19 15:12 PlatinMTA

https://github.com/multitheftauto/mtasa-blue/issues/1146

Allerek avatar Nov 10 '20 22:11 Allerek