Skip to content

Commit 5d9e91b

Browse files
authored
Merge pull request #93 from ollymonger/chore/voice-chat-improv-typings
chore: Updates to game audio / voiceChat typings
2 parents c09cd5f + c891b07 commit 5d9e91b

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

packages/client/game/audio.d.ts

+5
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,11 @@ declare interface GameAudio extends GameAudioLegacy {
352352
setVehicleHornVariation(vehicle: number, value: number): void;
353353
playPoliceCrimeReport(position: Vector3, crimeIndex: number, playDelay: number, localPlayer: boolean): void;
354354
unk: GameAudioUnk;
355+
356+
getCategoryVariable(categoryHash: number, fieldNameHash: number): void;
357+
setCategoryVariable(categoryHash: number, fieldNameHash: number, value: any): void;
358+
copyCategoryVariables(categoryTo: number, categoryFrom: number): void;
359+
restoreCategoryVariables(categoryHash: number): void;
355360
}
356361

357362
declare interface GameAudioMp extends GameAudio { }

packages/client/index.d.ts

+23
Original file line numberDiff line numberDiff line change
@@ -994,6 +994,26 @@ declare interface VoiceChatMp {
994994
setPreprocessingParam(setting: number, value: any): void;
995995

996996
cleanupAndReload(p0: boolean, p1: boolean, p2: boolean): void;
997+
998+
/**
999+
* Disabled by default.
1000+
* @example
1001+
* mp.voiceChat.gameOutputEnabled = true;
1002+
*/
1003+
gameOutputEnabled: boolean;
1004+
1005+
/**
1006+
* Default value is set to 'mp.game.joaat('SPEECH_SCRIPTED')'
1007+
* @example
1008+
* mp.voiceChat.gameOutputCategory = hash;
1009+
*/
1010+
gameOutputCategory: number;
1011+
1012+
advancedNoiseSuppression: boolean;
1013+
1014+
networkOptimisations: boolean;
1015+
1016+
bitrate: number;
9971017
}
9981018

9991019
declare interface RaycastingMp {
@@ -2358,6 +2378,8 @@ declare interface PlayerMp extends PedMpBase {
23582378
voiceAutoVolume: boolean;
23592379
voiceVolume: number;
23602380
voice3d: any;
2381+
voiceGameOutputEnabled: boolean;
2382+
voiceGameOutputCategory: number;
23612383

23622384
readonly action: string;
23632385
readonly aimTarget: boolean;
@@ -2473,6 +2495,7 @@ declare interface PlayerMp extends PedMpBase {
24732495
setVehicleDamageModifier(damageAmount: number): void;
24742496
setVehicleDefenseModifier(modifier: number): void;
24752497
setVoiceAttribute(attribute: any, value: any): void; // TODO
2498+
closeVoiceStream(): void;
24762499
setWantedCentrePosition(x: number, y: number, z: number): void;
24772500
setWantedLevel(wantedLevel: number, disableNoMission: boolean): void;
24782501
setWantedLevelNoDrop(wantedLevel: number, p2: boolean): void;

0 commit comments

Comments
 (0)