Skip to content

Commit

Permalink
feat(audio): batch 6 of native updates (#1002)
Browse files Browse the repository at this point in the history
* feat(audio): batch 6 of native updates

* Update IsAlarmPlaying.md

Re-add example requested by @PsychoShock

* Update IsAnyPositionalSpeechPlaying.md

Re-add NativeDB Introduced date.

---------

Co-authored-by: ammonia-cfx <[email protected]>
  • Loading branch information
AvarianKnight and 4mmonium authored Mar 8, 2024
1 parent dde8f66 commit ad206f1
Show file tree
Hide file tree
Showing 13 changed files with 76 additions and 96 deletions.
16 changes: 16 additions & 0 deletions AUDIO/InitSynchSceneAudioWithEntity.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
ns: AUDIO
aliases: ["0x950A154B8DAB6185", "_SET_SYNCHRONIZED_AUDIO_EVENT_POSITION_THIS_FRAME"]
---
## INIT_SYNCH_SCENE_AUDIO_WITH_ENTITY

```c
// 0x950A154B8DAB6185 0xA17F9AB0
void INIT_SYNCH_SCENE_AUDIO_WITH_ENTITY(char* audioName, Entity entity);
```
## Parameters
* **audioName**:
* **entity**:
18 changes: 18 additions & 0 deletions AUDIO/InitSynchSceneAudioWithPosition.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
ns: AUDIO
aliases: ["0xC8EDE9BDBCCBA6D4"]
---
## INIT_SYNCH_SCENE_AUDIO_WITH_POSITION

```c
// 0xC8EDE9BDBCCBA6D4 0x55A21772
void INIT_SYNCH_SCENE_AUDIO_WITH_POSITION(cs_type(AnyPtr) char* audioName, float x, float y, float z);
```
## Parameters
* **audioName**:
* **x**:
* **y**:
* **z**:
9 changes: 5 additions & 4 deletions AUDIO/InterruptConversation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ ns: AUDIO

```c
// 0xA018A12E5C5C2FA6 0xF3A67AF3
void INTERRUPT_CONVERSATION(Any p0, Any* p1, Any* p2);
void INTERRUPT_CONVERSATION(Ped interrupterPed, cs_type(AnyPtr) char* context, cs_type(AnyPtr) char* voiceName);
```
Handles conversation interrupts, using the code-side system for improved timing and to minimize unfriendly logic interactions.
## Parameters
* **p0**:
* **p1**:
* **p2**:
* **interrupterPed**: the ped speaking
* **context**: the line to use
* **voiceName**: the voicename for the audio asset
13 changes: 5 additions & 8 deletions AUDIO/InterruptConversationAndPause.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@ aliases: ["0x8A694D7A68F8DC38"]

```c
// 0x8A694D7A68F8DC38 0xDD4A3F1F
void INTERRUPT_CONVERSATION_AND_PAUSE(Ped ped, char* p1, char* p2);
void INTERRUPT_CONVERSATION_AND_PAUSE(Ped interrupterPed, char* context, char* voiceName);
```
```
One call found in the b617d scripts:
AUDIO::_8A694D7A68F8DC38(NETWORK::NET_TO_PED(l_3989._f26F[0/*1*/]), "CONV_INTERRUPT_QUIT_IT", "LESTER");
```
Handles conversation interrupts and pauses, using the code-side system for improved timing and to minimize unfriendly logic interactions.
## Parameters
* **ped**:
* **p1**:
* **p2**:
* **interrupterPed**: the ped speaking
* **context**: the line to use
* **voiceName**: the voicename for the audio asset
13 changes: 7 additions & 6 deletions AUDIO/IsAlarmPlaying.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ ns: AUDIO
BOOL IS_ALARM_PLAYING(char* alarmName);
```
```
Example:
bool playing = AUDIO::IS_ALARM_PLAYING("PORT_OF_LS_HEIST_FORT_ZANCUDO_ALARMS");
```
## Parameters
* **alarmName**:
* **alarmName**:
## Return value
Returns true if an alarm is currently playing with the specified name
## Examples
```lua
local bAlarmPlaying = IsAlarmPlaying("PORT_OF_LS_HEIST_FORT_ZANCUDO_ALARMS")
```
8 changes: 2 additions & 6 deletions AUDIO/IsAmbientSpeechDisabled.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,8 @@ ns: AUDIO
BOOL IS_AMBIENT_SPEECH_DISABLED(Ped ped);
```
```
Common in the scripts:
AUDIO::IS_AMBIENT_SPEECH_DISABLED(PLAYER::PLAYER_PED_ID());
```
## Parameters
* **ped**:
* **ped**:
## Return value
Returns true if ambient speech for the ped has been disabled
3 changes: 2 additions & 1 deletion AUDIO/IsAmbientSpeechPlaying.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ BOOL IS_AMBIENT_SPEECH_PLAYING(Ped ped);
## Parameters
* **ped**:
* **ped**:
## Return value
Returns true if the ped is currently playing ambient speech
3 changes: 2 additions & 1 deletion AUDIO/IsAmbientZoneEnabled.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ BOOL IS_AMBIENT_ZONE_ENABLED(char* ambientZone);
## Parameters
* **ambientZone**:
* **ambientZone**:
## Return value
Returns true if the given ambient zone is allowed to be active
3 changes: 2 additions & 1 deletion AUDIO/IsAnimalVocalizationPlaying.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ BOOL IS_ANIMAL_VOCALIZATION_PLAYING(Ped pedHandle);
```
## Parameters
* **pedHandle**:
* **pedHandle**:
## Return value
Returns true of the ped is currently playing animal sounds
17 changes: 17 additions & 0 deletions AUDIO/IsAnyPositionalSpeechPlaying.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
ns: AUDIO
aliases: ["0x30CA2EF91D15ADF8"]
---
## IS_ANY_POSITIONAL_SPEECH_PLAYING

```c
// 0x30CA2EF91D15ADF8
cs_type(Any) BOOL IS_ANY_POSITIONAL_SPEECH_PLAYING();
```
```
NativeDB Introduced: v2189
```
## Return value
Returns true if any ped-independent positional scripted speech (ie. triggered using [PLAY_AMBIENT_SPEECH_FROM_POSITION_NATIVE](#_0xED640017ED337E45)) is currently playing
14 changes: 0 additions & 14 deletions AUDIO/N_0x30ca2ef91d15adf8.md

This file was deleted.

17 changes: 0 additions & 17 deletions AUDIO/N_0xc8ede9bdbccba6d4.md

This file was deleted.

38 changes: 0 additions & 38 deletions AUDIO/SetSynchronizedAudioEventPositionThisFrame.md

This file was deleted.

0 comments on commit ad206f1

Please sign in to comment.