soundParams: Difference between revisions
Lou Montana (talk | contribs) (2.12 mini-update) |
Killzone Kid (talk | contribs) No edit summary |
||
| Line 10: | Line 10: | ||
|s1= [[soundParams]] id | |s1= [[soundParams]] id | ||
|p1= id: [[Number]] - id returned by [[playSoundUI]] and [[playSound3D]] commands | |p1= id: [[Number]] - id returned by [[playSoundUI]] and [[playSound3D]] commands, -1 to return all currenttly playing ids | ||
|r1= [[Array]] in format [path, curPos, length, time, volume], where: | |r1= [[Array]] in format [path, curPos, length, time, volume], where: | ||
| Line 18: | Line 18: | ||
* time: [[Number]] - time passed since the start of playback | * time: [[Number]] - time passed since the start of playback | ||
* volume: [[Number]] - playback volume | * volume: [[Number]] - playback volume | ||
* loop: [[Boolean]] - the sound is looping | |||
Or if id is -1 - [[Array]] in format [sid1, sid2, sid3..., sidn], where sid is sound id returned by [[playSoundUI]] and [[playSound3D]] (Since Arma3 2.22) | |||
|x1= <sqf>_params = soundParams 10;</sqf> | |x1= <sqf>_params = soundParams 10;</sqf> | ||
Revision as of 18:13, 21 November 2025
Description
- Description:
- Returns various params for the given sound
- Groups:
- Sounds
Syntax
- Syntax:
- soundParams id
- Parameters:
- id: Number - id returned by playSoundUI and playSound3D commands, -1 to return all currenttly playing ids
- Return Value:
- Array in format [path, curPos, length, time, volume], where:
- path: String - the path to the played sound file
- curPos: Number - current play position in 0...1 range
- length: Number - total sound duration in seconds
- time: Number - time passed since the start of playback
- volume: Number - playback volume
- loop: Boolean - the sound is looping
Examples
- Example 1:
Additional Information
- See also:
- playSoundUI playSound3D stopSound
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
- Posted on May 14, 2023 - 13:57 (UTC)
- Wait for sound to end: