Skip to content

Commit

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

* Update LockRadioStation.md

Re-add NativeDB Introduced comment.

* Update LinkStaticEmitterToEntity.md

Add underscore to aliases.

* Update LockRadioStation.md

Add old alias "_LOCK_RADIO_STATION".

* Update LoadStream.md

Re-add list of streams, but from github's gist.

---------

Co-authored-by: ammonia-cfx <[email protected]>
  • Loading branch information
AvarianKnight and 4mmonium authored Mar 12, 2024
1 parent 1d2e056 commit 2c8cf42
Show file tree
Hide file tree
Showing 12 changed files with 51 additions and 64 deletions.
17 changes: 17 additions & 0 deletions AUDIO/IsRadioStationFavourited.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
ns: AUDIO
aliases: ["_IS_RADIO_STATION_VISIBLE"]
---

## IS_RADIO_STATION_FAVOURITED

```c
// 0x2B1784DB08AFEA79
BOOL IS_RADIO_STATION_FAVOURITED(char* radioStation);
```
## Parameters
* **radioStation**:
## Return value
Returns whether a radio station is a favourite.
17 changes: 0 additions & 17 deletions AUDIO/IsRadioStationVisible.md

This file was deleted.

2 changes: 1 addition & 1 deletion AUDIO/IsScriptedConversationLoaded.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ ns: AUDIO
BOOL IS_SCRIPTED_CONVERSATION_LOADED();
```


## Return value
Returns true if the first batch of lines for the currently requested conversation have loaded successfully.
5 changes: 3 additions & 2 deletions AUDIO/IsScriptedSpeechPlaying.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ ns: AUDIO

```c
// 0xCC9AA18DCC7084F4 0x2C653904
BOOL IS_SCRIPTED_SPEECH_PLAYING(Any p0);
BOOL IS_SCRIPTED_SPEECH_PLAYING(Ped ped);
```
## Parameters
* **p0**:
* **ped**:
## Return value
Returns true if scripted speech is currently playing from the given ped.
1 change: 1 addition & 0 deletions AUDIO/IsStreamPlaying.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ BOOL IS_STREAM_PLAYING();


## Return value
Returns true if the script is currently playing a stream.
3 changes: 2 additions & 1 deletion AUDIO/IsVehicleAudiblyDamaged.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ BOOL IS_VEHICLE_AUDIBLY_DAMAGED(Vehicle vehicle);
```
## Parameters
* **vehicle**:
* **vehicle**:
## Return value
Returns true if the vehicle has any audible damage effects applied to it.
12 changes: 4 additions & 8 deletions AUDIO/IsVehicleRadioEnabled.md → AUDIO/IsVehicleRadioOn.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
---
ns: AUDIO
aliases: ["0x0BE4BE946463F917"]
aliases: ["0x0BE4BE946463F917", "_IS_VEHICLE_RADIO_ENABLED"]
---
## _IS_VEHICLE_RADIO_ENABLED
## IS_VEHICLE_RADIO_ON

```c
// 0x0BE4BE946463F917
BOOL _IS_VEHICLE_RADIO_ENABLED(Vehicle vehicle);
```
```
IS_VEHICLE_*
BOOL IS_VEHICLE_RADIO_ON(Vehicle vehicle);
```
## Parameters
* **vehicle**: The vehicle to check
## Return value
Is the given vehicle's radio enabled
Returns true if the given vehicle's radio on
## Examples
```lua
Expand Down
14 changes: 6 additions & 8 deletions AUDIO/LinkStaticEmitterToEntity.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
---
ns: AUDIO
aliases: ["0x651D3228960D08AF"]
aliases: ["0x651D3228960D08AF", "_LINK_STATIC_EMITTER_TO_ENTITY"]
---
## _LINK_STATIC_EMITTER_TO_ENTITY
## LINK_STATIC_EMITTER_TO_ENTITY

```c
// 0x651D3228960D08AF
void _LINK_STATIC_EMITTER_TO_ENTITY(char* emitterName, Entity entity);
void LINK_STATIC_EMITTER_TO_ENTITY(char* emitterName, Entity entity);
```
```
L* (LINK_*?)
```
Links a static emitter to the given entity
## Parameters
* **emitterName**:
* **entity**:
* **emitterName**:
* **entity**:
15 changes: 6 additions & 9 deletions AUDIO/LoadStream.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,13 @@ ns: AUDIO
BOOL LOAD_STREAM(char* streamName, char* soundSet);
```
```
Example:
AUDIO::LOAD_STREAM("CAR_STEAL_1_PASSBY", "CAR_STEAL_1_SOUNDSET");
All found occurrences in the b678d decompiled scripts: pastebin.com/3rma6w5w
Stream names often ends with "_MASTER", "_SMALL" or "_STREAM". Also "_IN", "_OUT" and numbers.
soundSet is often set to 0 in the scripts. These are common to end the soundSets: "_SOUNDS", "_SOUNDSET" and numbers.
```
Load in named stream. Optionally can specify a sound set which contains the sound specified by name.
Names for the streams can be found [here](https://gist.github.com/4mmonium/2bd2c9c54d6ca5cbdb7b156a82a3a85a
), the list will be updated as more are found.
## Parameters
* **streamName**:
* **soundSet**:
* **streamName**:
* **soundSet**: an optional sound set, default is null
## Return value
12 changes: 4 additions & 8 deletions AUDIO/LoadStreamWithStartOffset.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,11 @@ ns: AUDIO
BOOL LOAD_STREAM_WITH_START_OFFSET(char* streamName, int startOffset, char* soundSet);
```
```
Example:
AUDIO::LOAD_STREAM_WITH_START_OFFSET("STASH_TOXIN_STREAM", 2400, "FBI_05_SOUNDS");
Only called a few times in the scripts.
```
Load in named stream. Optionally can specify a sound set which contains the sound specified by name.
## Parameters
* **streamName**:
* **startOffset**:
* **soundSet**:
* **streamName**:
* **startOffset**:
* **soundSet**:
## Return value
10 changes: 5 additions & 5 deletions AUDIO/LockRadioStation.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
ns: AUDIO
aliases: ["0x94f2e83ead7e6b82","_SET_RADIO_STATION_DISABLED"]
aliases: ["0x94f2e83ead7e6b82","_SET_RADIO_STATION_DISABLED", "_LOCK_RADIO_STATION"]
---
## _LOCK_RADIO_STATION
## LOCK_RADIO_STATION

```c
// 0x477D9DB48F889591
void _LOCK_RADIO_STATION(char* radioStationName, BOOL toggle);
void LOCK_RADIO_STATION(char* radioStationName, BOOL toggle);
```
```
Disables the radio station (hides it from the radio wheel).
This disables the radio station completely - it won't be selectable on the radio wheel or ever be heard coming from a vehicle/ambient emitter
```
NativeDB Introduced: v1493
```
Expand Down
7 changes: 2 additions & 5 deletions AUDIO/LockRadioStationTrackList.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
---
ns: AUDIO
---
## _LOCK_RADIO_STATION_TRACK_LIST
## LOCK_RADIO_STATION_TRACK_LIST

```c
// 0xFF5E5EA2DCEEACF3
void _LOCK_RADIO_STATION_TRACK_LIST(char* radioStation, char* trackListName);
void LOCK_RADIO_STATION_TRACK_LIST(char* radioStation, char* trackListName);
```
```
NativeDB Introduced: v2372
```
## Parameters
* **radioStation**:
Expand Down

0 comments on commit 2c8cf42

Please sign in to comment.