FAudioGMS-Docs/docs/latest/Functions-(Sound-Instances).md

218 lines
9.4 KiB
Markdown
Raw Normal View History

2021-11-02 21:45:21 +00:00
## `~_SoundInstance_Play(soundInstanceID, loop)`
2021-11-02 21:13:56 +00:00
**Returns:** N/A (`undefined`)
|Argument |Datatype|Description |
|-----------------|--------|------------------------------------------------------|
|`soundInstanceID`|number | |
|`loop` |boolean | |
 
2021-11-02 21:45:21 +00:00
## `~_SoundInstance_Pause(soundInstanceID)`
2021-11-02 21:13:56 +00:00
**Returns:** N/A (`undefined`)
|Argument |Datatype|Description |
|-----------------|--------|------------------------------------------------------|
|`soundInstanceID`|number | |
 
2021-11-02 21:45:21 +00:00
## `~_SoundInstance_Stop(soundInstanceID)`
2021-11-02 21:13:56 +00:00
**Returns:** N/A (`undefined`)
|Argument |Datatype|Description |
|-----------------|--------|------------------------------------------------------|
|`soundInstanceID`|number | |
 
2021-11-02 21:45:21 +00:00
## `~_SoundInstance_Destroy(soundInstanceID)`
2021-11-02 21:13:56 +00:00
**Returns:** N/A (`undefined`)
|Argument |Datatype|Description |
|-----------------|--------|------------------------------------------------------|
|`soundInstanceID`|number | |
 
2021-11-02 21:45:21 +00:00
## `~_SoundInstance_DestroyWhenFinished(soundInstanceID)`
2021-11-02 21:13:56 +00:00
**Returns:** N/A (`undefined`)
|Argument |Datatype|Description |
|-----------------|--------|------------------------------------------------------|
|`soundInstanceID`|number | |
 
2021-11-02 21:45:21 +00:00
## `~_SoundInstance_SetPan(soundInstanceID, pan)`
2021-11-02 21:13:56 +00:00
**Returns:** N/A (`undefined`)
|Argument |Datatype|Description |
|-----------------|--------|---------------------------------------------------------------------------|
|`soundInstanceID`|number | |
|`pan` |number |Should be from `-1` (100% left) to `+1` (100% right) with `0` being central|
 
2021-11-02 21:45:21 +00:00
## `~_SoundInstance_SetPitch(soundInstanceID, pitch)`
2021-11-02 21:13:56 +00:00
**Returns:** N/A (`undefined`)
|Argument |Datatype|Description |
|-----------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------|
|`soundInstanceID`|number | |
|`pitch` |number |Frequency multiplier. A value of `2` will double the frequency and make the pitch higher, a value of `0.5` will halve the frequency and make the pitch lower|
 
2021-11-02 21:45:21 +00:00
## `~_SoundInstance_SetVolume(soundInstanceID, volume)`
2021-11-02 21:13:56 +00:00
**Returns:** N/A (`undefined`)
|Argument |Datatype|Description |
|-----------------|--------|--------------------------------------------------------|
|`soundInstanceID`|number | |
|`volume` |number | |
 
2021-11-02 21:45:21 +00:00
## `~_SoundInstance_Set3DPosition(soundInstanceID, x, y, z)`
2021-11-02 21:13:56 +00:00
**Returns:** N/A (`undefined`)
|Argument |Datatype|Description |
|-----------------|--------|--------------------------------------------------------|
|`soundInstanceID`|number | |
|`x` |number | |
|`y` |number | |
|`z` |number | |
 
2021-11-02 21:45:21 +00:00
## `~_SoundInstance_Set3DVelocity(soundInstanceID, xVelocity, yVelocity, zVelocity)`
2021-11-02 21:13:56 +00:00
**Returns:** N/A (`undefined`)
|Argument |Datatype|Description |
|-----------------|--------|--------------------------------------------------------|
|`soundInstanceID`|number | |
|`xVelocity` |number | |
|`yVelocity` |number | |
|`zVelocity` |number | |
 
2021-11-02 21:45:21 +00:00
## `~_SoundInstance_SetTrackPositionInSeconds(soundInstanceID, trackPositionInSeconds)`
2021-11-02 21:13:56 +00:00
**Returns:** N/A (`undefined`)
|Argument |Datatype|Description |
|------------------------|--------|--------------------------------------------------------|
|`soundInstanceID` |number | |
|`trackPositionInSeconds`|number | |
 
2021-11-02 21:45:21 +00:00
## `~_SoundInstance_SetVolumeOverTime(soundInstanceID, volume, milliseconds)`
2021-11-02 21:13:56 +00:00
**Returns:** N/A (`undefined`)
|Argument |Datatype|Description |
|-----------------|--------|--------------------------------------------------------|
|`soundInstanceID`|number | |
|`volume` |number | |
|`milliseconds` |number | |
 
2021-11-02 21:45:21 +00:00
## `~_SoundInstance_SetLowPassFilter(soundInstanceID, lowPassFilter, Q)`
2021-11-02 21:13:56 +00:00
**Returns:** N/A (`undefined`)
|Argument |Datatype|Description |
|-----------------|--------|--------------------------------------------------------|
|`soundInstanceID`|number | |
|`lowPassFilter` |number | |
|`Q` |number | |
 
2021-11-02 21:45:21 +00:00
## `~_SoundInstance_SetHighPassFilter(soundInstanceID, lowPassFilter, Q)`
2021-11-02 21:13:56 +00:00
**Returns:** N/A (`undefined`)
|Argument |Datatype|Description |
|-----------------|--------|--------------------------------------------------------|
|`soundInstanceID`|number | |
|`lowPassFilter` |number | |
|`Q` |number | |
 
2021-11-02 21:45:21 +00:00
## `~_SoundInstance_SetHighPassFilter(soundInstanceID, highPassFilter, Q)`
2021-11-02 21:13:56 +00:00
**Returns:** N/A (`undefined`)
|Argument |Datatype|Description |
|-----------------|--------|--------------------------------------------------------|
|`soundInstanceID`|number | |
|`highPassFilter` |number | |
|`Q` |number | |
 
2021-11-02 21:45:21 +00:00
## `~_SoundInstance_SetBandPassFilter(soundInstanceID, bandPassFilter, Q)`
2021-11-02 21:13:56 +00:00
**Returns:** N/A (`undefined`)
|Argument |Datatype|Description |
|-----------------|--------|--------------------------------------------------------|
|`soundInstanceID`|number | |
|`bandPassFilter` |number | |
|`Q` |number | |
2021-11-02 21:20:20 +00:00
 
2021-11-02 21:45:21 +00:00
## `~_SoundInstance_GetPitch(soundInstanceID)`
2021-11-02 21:20:20 +00:00
**Returns:** Number, the pitch of the sound instance, with `1` being no pitch shift
|Argument |Datatype|Description |
|-----------------|--------|--------------------------------------------------------|
|`soundInstanceID`|number | |
 
2021-11-02 21:45:21 +00:00
## `~_SoundInstance_GetVolume(soundInstanceID)`
2021-11-02 21:20:20 +00:00
**Returns:** Number, the volume of the sound instance, from `0` (inaudible) to `1` (full volume)
|Argument |Datatype|Description |
|-----------------|--------|--------------------------------------------------------|
|`soundInstanceID`|number | |
 
2021-11-02 21:45:21 +00:00
## `~_SoundInstance_GetTrackLengthInSeconds(soundInstanceID)`
2021-11-02 21:20:20 +00:00
**Returns:** Number, the track length (in seconds)
|Argument |Datatype|Description |
|-----------------|--------|--------------------------------------------------------|
|`soundInstanceID`|number | |
 
2021-11-02 21:45:21 +00:00
## `~_SoundInstance_GetTrackPositionInSeconds(soundInstanceID)`
2021-11-02 21:20:20 +00:00
**Returns:** Number, the track position (in seconds)
|Argument |Datatype|Description |
|-----------------|--------|--------------------------------------------------------|
2021-11-02 21:32:46 +00:00
|`soundInstanceID`|number | |