altv-issues icon indicating copy to clipboard operation
altv-issues copied to clipboard

`addVoiceFilter` is not reset on player disconnect

Open xxshady opened this issue 1 year ago • 1 comments

Description of the problem

maybe affected by enableSyncedMetaData = false in server config and maybe because of it voice brokes, i can't hear remote player, we tested it with non-spatial channel

Reproduction steps

globalThis.walkieTalkieFilter = new alt.AudioFilter('walkietalkie');
globalThis.walkieTalkieFilter.addBqfEffect(0, 1400, 0, 0.86, 0, 0, 1);
globalThis.walkieTalkieFilter.addBqfEffect(1, 900, 0, 0.83, 0, 0, 2);
globalThis.walkieTalkieFilter.addDistortionEffect(0, -2.95, -0.05, -0.08, 0.5, 3);

const [, player] = alt.Player.all;
globalThis.playerRemoteID = player.remoteID;
alt.addVoiceFilter(globalThis.playerRemoteID, globalThis.walkieTalkieFilter);
  1. Remote player should disconnect (free remote id)
  2. Connect (take same remote id back)
const f = alt.getVoiceFilter(globalThis.playerRemoteID);
alt.log(f, f === globalThis.walkieTalkieFilter);

Expected behaviour

Filter should reset on player disconnect

Additional context

No response

Operating system

Windows 11

Version

16.0.0-dev.126

Crashdump ID

No response

Confirmation of issue's presence

  • [X] By submitting this ticket, I affirm that I have verified the presence of this issue on the latest developer version available at the time of writing this ticket.

xxshady avatar Jan 11 '24 21:01 xxshady

Its intended, but needs to be documented and discussed further.

ThomasMarangoni avatar Jan 16 '24 17:01 ThomasMarangoni