Skip to content

Commit

Permalink
feat(audio): batch 15 of native updates (#1011)
Browse files Browse the repository at this point in the history
  • Loading branch information
AvarianKnight authored Feb 20, 2024
1 parent 468989d commit eb26cf1
Show file tree
Hide file tree
Showing 13 changed files with 111 additions and 72 deletions.
14 changes: 0 additions & 14 deletions AUDIO/N_0x0b568201dd99f0eb.md

This file was deleted.

14 changes: 0 additions & 14 deletions AUDIO/N_0x61631f5df50d1c34.md

This file was deleted.

15 changes: 0 additions & 15 deletions AUDIO/N_0x892b6ab8f33606f5.md

This file was deleted.

6 changes: 4 additions & 2 deletions AUDIO/SetAudioScriptCleanupTime.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ aliases: ["0xA5F377B175A699C5"]

```c
// 0xA5F377B175A699C5 0xE812925D
void SET_AUDIO_SCRIPT_CLEANUP_TIME(int time);
void SET_AUDIO_SCRIPT_CLEANUP_TIME(int timeMs);
```
Set a delay in milliseconds for the audio to be cleaned up when the script finishes.
## Parameters
* **time**:
* **timeMs**:
16 changes: 15 additions & 1 deletion AUDIO/SetAudioSpecialEffectMode.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,21 @@ void SET_AUDIO_SPECIAL_EFFECT_MODE(int mode);
```
Needs to be called every frame.
Audio mode to apply this frame: https://alloc8or.re/gta5/doc/enums/audSpecialEffectMode.txt
```c
enum audSpecialEffectMode
{
kSpecialEffectModeNormal = 0,
kSpecialEffectModeUnderwater = 1,
kSpecialEffectModeStoned = 2,
kSpecialEffectModePauseMenu = 3,
kSpecialEffectModeSlowMotion = 4,
kSpecialEffectModeDrunkStage01 = 5,
kSpecialEffectModeDrunkStage02 = 6,
kSpecialEffectModeDrunkStage03 = 7,
NUM_AUDSPECIALEFFECTMODE
};
```

## Parameters
* **mode**: Audio mode to apply this frame
Expand Down
27 changes: 24 additions & 3 deletions AUDIO/SetAudioVehiclePriority.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,32 @@ ns: AUDIO

```c
// 0xE5564483E407F914 0x271A9766
void SET_AUDIO_VEHICLE_PRIORITY(Vehicle vehicle, Any p1);
void SET_AUDIO_VEHICLE_PRIORITY(Vehicle vehicle, int priority);
```
Sets the priority for the given vehicle. This is a hint for the audio system as to what LOD the
vehicle should use.
'High' priority will bump up the activation range significantly and prevent it
from dropping when the vehicle is not within the view frustrum.
'Max' will attempt to keep the vehicle at maximum LOD regardless of how far it is from the listener or what it is currently doing. Be careful with this!
There is a hard limit of 5 simulataneous granular cars (including the player) so we are quite limited on the number
we can play at once, so setting vehicles to max priority will reduce the number of engines availble for regular NPC vehicles
```c
enum eAudVehiclePriority {
AUDIO_VEHICLE_PRIORITY_NORMAL = 0,
AUDIO_VEHICLE_PRIORITY_MEDIUM = 1,
AUDIO_VEHICLE_PRIORITY_MAX = 2,
AUDIO_VEHICLE_PRIORITY_HIGH = 3,
}
```


## Parameters
* **vehicle**:
* **p1**:
* **vehicle**:
* **priority**:

16 changes: 16 additions & 0 deletions AUDIO/SetConversationAudioControlledByAnim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
ns: AUDIO
aliases: ["0x0B568201DD99F0EB"]
---
## SET_CONVERSATION_AUDIO_CONTROLLED_BY_ANIM

```c
// 0x0B568201DD99F0EB 0x1193ED6E
void SET_CONVERSATION_AUDIO_CONTROLLED_BY_ANIM(BOOL enable);
```
Sets whether or not scripted conversation flow should be controlled by anim triggers
## Parameters
* **enable**: Pass in true to set conversation flow to be controlled by animation triggers.
15 changes: 15 additions & 0 deletions AUDIO/SetConversationAudioPlaceholder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
ns: AUDIO
aliases: ["0x61631F5DF50D1C34"]
---
## SET_CONVERSATION_AUDIO_PLACEHOLDER

```c
// 0x61631F5DF50D1C34
void SET_CONVERSATION_AUDIO_PLACEHOLDER(BOOL isPlaceHolder);
```
Used to determine whether conversation should use robot speech or not
## Parameters
* **isPlaceHolder**: Whether or not the conversation should use robot speech or not
22 changes: 7 additions & 15 deletions AUDIO/SetCustomRadioTrackList.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,15 @@ aliases: ["0x4E404A9361F75BB2"]

```c
// 0x4E404A9361F75BB2 0x128C3873
void SET_CUSTOM_RADIO_TRACK_LIST(char* radioStation, char* trackListName, BOOL p2);
void SET_CUSTOM_RADIO_TRACK_LIST(char* radioStation, char* trackListName, BOOL forceNow);
```
```
Examples:
AUDIO::SET_CUSTOM_RADIO_TRACK_LIST("RADIO_01_CLASS_ROCK", "END_CREDITS_KILL_MICHAEL", 1);
AUDIO::SET_CUSTOM_RADIO_TRACK_LIST("RADIO_01_CLASS_ROCK", "END_CREDITS_KILL_MICHAEL", 1);
AUDIO::SET_CUSTOM_RADIO_TRACK_LIST("RADIO_01_CLASS_ROCK", "END_CREDITS_KILL_TREVOR", 1);
AUDIO::SET_CUSTOM_RADIO_TRACK_LIST("RADIO_01_CLASS_ROCK", "END_CREDITS_SAVE_MICHAEL_TREVOR", 1);
AUDIO::SET_CUSTOM_RADIO_TRACK_LIST("RADIO_01_CLASS_ROCK", "OFF_ROAD_RADIO_ROCK_LIST", 1);
AUDIO::SET_CUSTOM_RADIO_TRACK_LIST("RADIO_06_COUNTRY", "MAGDEMO2_RADIO_DINGHY", 1);
AUDIO::SET_CUSTOM_RADIO_TRACK_LIST("RADIO_16_SILVERLAKE", "SEA_RACE_RADIO_PLAYLIST", 1);
AUDIO::SET_CUSTOM_RADIO_TRACK_LIST("RADIO_01_CLASS_ROCK", "OFF_ROAD_RADIO_ROCK_LIST", 1);
```
Queues up a custom track list on the specified radio station. The content in the track list will be played as soon as possible.
The station does not have to be frozen.
## Parameters
* **radioStation**:
* **trackListName**:
* **p2**:
* **radioStation**:
* **trackListName**:
* **forceNow**: wheter or not to interrupt the current track on the tracklist
13 changes: 8 additions & 5 deletions AUDIO/SetCutsceneAudioOverride.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ void SET_CUTSCENE_AUDIO_OVERRIDE(char* name);
```
```
All occurrences found in b617d, sorted alphabetically and identical lines removed:
AUDIO::SET_CUTSCENE_AUDIO_OVERRIDE("_AK");
AUDIO::SET_CUTSCENE_AUDIO_OVERRIDE("_CUSTOM");
AUDIO::SET_CUTSCENE_AUDIO_OVERRIDE("_TOOTHLESS");
All occurrences found in b617d, sorted alphabetically and identical lines removed:
AUDIO::SET_CUTSCENE_AUDIO_OVERRIDE("_AK");
AUDIO::SET_CUTSCENE_AUDIO_OVERRIDE("_CUSTOM");
AUDIO::SET_CUTSCENE_AUDIO_OVERRIDE("_TOOTHLESS");
```
Add a suffix to the cutscene audio name. Call before loading the cutscene.
## Parameters
* **name**:
* **name**:
6 changes: 4 additions & 2 deletions AUDIO/SetEmitterRadioStation.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ ns: AUDIO
void SET_EMITTER_RADIO_STATION(char* emitterName, char* radioStation);
```
Retunes a named static emitter to the specified station
## Parameters
* **emitterName**:
* **radioStation**:
* **emitterName**:
* **radioStation**:
16 changes: 16 additions & 0 deletions AUDIO/SetEntityForNullConvPed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
ns: AUDIO
aliases: ["0x892B6AB8F33606F5"]
---
## SET_ENTITY_FOR_NULL_CONV_PED

```c
// 0x892B6AB8F33606F5 0x88203DDA
void SET_ENTITY_FOR_NULL_CONV_PED(int speakerConversationIndex, Entity entity);
```
## Parameters
* **speakerConversationIndex**:
* **entity**:
3 changes: 2 additions & 1 deletion AUDIO/SetFrontendRadioActive.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ ns: AUDIO
void SET_FRONTEND_RADIO_ACTIVE(BOOL active);
```
Allows the radio to be played in the frontend.
## Parameters
* **active**:
* **active**:

0 comments on commit eb26cf1

Please sign in to comment.