Skip to content

Commit

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

* Update PreloadVehicleAudioBank.md

Re-add nativedb introduced date.

* Update PrepareSynchronizedAudioEvent.md

startOffsetMs seems to be an unused parameter since build 323.

---------

Co-authored-by: ammonia-cfx <[email protected]>
  • Loading branch information
AvarianKnight and 4mmonium authored Mar 12, 2024
1 parent b34658b commit 9e9c2ed
Show file tree
Hide file tree
Showing 12 changed files with 56 additions and 58 deletions.
15 changes: 2 additions & 13 deletions AUDIO/PlayStreamFromObject.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,8 @@ ns: AUDIO
void PLAY_STREAM_FROM_OBJECT(Object object);
```
```
Used with AUDIO::LOAD_STREAM
Example from finale_heist2b.c4:
TASK::TASK_SYNCHRONIZED_SCENE(l_4C8[2/*14*/], l_4C8[2/*14*/]._f7, l_30A, "push_out_vault_l", 4.0, -1.5, 5, 713, 4.0, 0);
PED::SET_SYNCHRONIZED_SCENE_PHASE(l_4C8[2/*14*/]._f7, 0.0);
PED::_2208438012482A1A(l_4C8[2/*14*/], 0, 0);
PED::SET_PED_COMBAT_ATTRIBUTES(l_4C8[2/*14*/], 38, 1);
PED::SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(l_4C8[2/*14*/], 1);
if (AUDIO::LOAD_STREAM("Gold_Cart_Push_Anim_01", "BIG_SCORE_3B_SOUNDS")) {
AUDIO::PLAY_STREAM_FROM_OBJECT(l_36F[0/*1*/]);
}
```
Plays a preloaded stream back from the specified object.
## Parameters
* **object**:
* **object**:
3 changes: 2 additions & 1 deletion AUDIO/PlayStreamFromPed.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ aliases: ["0x89049DD63C08B5D1"]
void PLAY_STREAM_FROM_PED(Ped ped);
```
Plays a preloaded stream back from the specified ped.
## Parameters
* **ped**:
* **ped**:
7 changes: 4 additions & 3 deletions AUDIO/PlayStreamFromPosition.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ aliases: ["SPECIAL_FRONTEND_EQUAL"]
void PLAY_STREAM_FROM_POSITION(float x, float y, float z);
```
Plays a preloaded stream back from the specified Vector3.
## Parameters
* **x**:
* **y**:
* **z**:
* **x**:
* **y**:
* **z**:
5 changes: 3 additions & 2 deletions AUDIO/PlayStreamFromVehicle.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ ns: AUDIO
void PLAY_STREAM_FROM_VEHICLE(Vehicle vehicle);
```
Plays a preloaded stream back from the specified ped vehicle
## Parameters
* **vehicle**:
## Parameters
* **vehicle**:
4 changes: 2 additions & 2 deletions AUDIO/PlaySynchronizedAudioEvent.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ ns: AUDIO

```c
// 0x8B2FD4560E55DD2D 0x507F3241
BOOL PLAY_SYNCHRONIZED_AUDIO_EVENT(Any p0);
BOOL PLAY_SYNCHRONIZED_AUDIO_EVENT(int sceneId);
```
## Parameters
* **p0**:
* **sceneId**:
## Return value
16 changes: 11 additions & 5 deletions AUDIO/PreloadScriptConversation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@ ns: AUDIO

```c
// 0x3B3CAD6166916D87 0xDDF5C579
void PRELOAD_SCRIPT_CONVERSATION(BOOL p0, BOOL p1, BOOL p2, BOOL p3);
void PRELOAD_SCRIPT_CONVERSATION(BOOL displaySubtitles, BOOL addToBriefScreen, BOOL cloneConversation, BOOL interruptible);
```
Similar to [START_SCRIPT_CONVERSATION](#_0x6B17C62C9635D2DC), except that is starts the conversation off paused.
A scripter can then kick off the conversation by calling [START_PRELOADED_CONVERSATION](#_0x23641AFE870AF385).
If they want to check that the conversation is done preloading, they can use [GET_IS_PRELOADED_CONVERSATION_READY](#_0xE73364DB90778FFA)
## Parameters
* **p0**:
* **p1**:
* **p2**:
* **p3**:
* **displaySubtitles**:
* **addToBriefScreen**: Defaults to true
* **cloneConversation**: Defaults to false
* **interruptible**: Defaults to true
6 changes: 3 additions & 3 deletions AUDIO/PreloadScriptPhoneConversation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ ns: AUDIO

```c
// 0x6004BCB0E226AAEA 0x9ACB213A
void PRELOAD_SCRIPT_PHONE_CONVERSATION(BOOL p0, BOOL p1);
void PRELOAD_SCRIPT_PHONE_CONVERSATION(BOOL displaySubtitles, BOOL addToBriefScreen);
```
## Parameters
* **p0**:
* **p1**:
* **displaySubtitles**:
* **addToBriefScreen**: Defaults to true
17 changes: 0 additions & 17 deletions AUDIO/PreloadVehicleAudio.md

This file was deleted.

20 changes: 20 additions & 0 deletions AUDIO/PreloadVehicleAudioBank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
ns: AUDIO
aliases: ["0xCA4CEA6AE0000A7E", "_PRELOAD_VEHICLE_AUDIO"]
---
## PRELOAD_VEHICLE_AUDIO_BANK

```c
// 0xCA4CEA6AE0000A7E
void PRELOAD_VEHICLE_AUDIO_BANK(Hash model);
```
Request that we preload the required audio bank for a given vehicle model.
```
NativeDB Introduced: v1180
```
## Parameters
* **model**:
8 changes: 3 additions & 5 deletions AUDIO/PrepareAlarm.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ ns: AUDIO
BOOL PREPARE_ALARM(char* alarmName);
```
```
Example:
bool prepareAlarm = AUDIO::PREPARE_ALARM("PORT_OF_LS_HEIST_FORT_ZANCUDO_ALARMS");
```
Prepares any banks required to play the given alarm
## Parameters
* **alarmName**:
* **alarmName**:
## Return value
Returns true if the alarm was successfully prepared
7 changes: 3 additions & 4 deletions AUDIO/PrepareMusicEvent.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ ns: AUDIO
BOOL PREPARE_MUSIC_EVENT(char* eventName);
```
```
All music event names found in the b617d scripts: pastebin.com/GnYt0R3P
```
Prepares the specified music event. Preparing it in advance will preload any required data so that it's ready to play immediately.
## Parameters
* **eventName**:
* **eventName**:
## Return value
Returns true if the event is prepared, false otherwise
6 changes: 3 additions & 3 deletions AUDIO/PrepareSynchronizedAudioEvent.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ ns: AUDIO

```c
// 0xC7ABCACA4985A766 0xE1D91FD0
Any PREPARE_SYNCHRONIZED_AUDIO_EVENT(char* p0, Any p1);
cs_type(Any) BOOL PREPARE_SYNCHRONIZED_AUDIO_EVENT(char* audioEvent, int startOffsetMs);
```
## Parameters
* **p0**:
* **p1**:
* **audioEvent**: The audio event name.
* **startOffsetMs**: Unused parameter (since v323)
## Return value

0 comments on commit 9e9c2ed

Please sign in to comment.