soundParams: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "‎" to "")
No edit summary
Line 23: Line 23:


|seealso= [[playSoundUI]] [[playSound3D]] [[stopSound]]
|seealso= [[playSoundUI]] [[playSound3D]] [[stopSound]]
}}
{{Note
|user= Hypoxic125
|timestamp= 20230514135752
|text= Wait for sound to end:
<sqf>
private _sound = playSound3D ["A3\Sounds_F\sfx\blip1.wss", player];
waitUntil { soundParams _sound isEqualTo [] };
</sqf>
}}
}}

Revision as of 15:57, 14 May 2023

Hover & click on the images for description
Only available in Development branch(es) until its release with Arma 3 patch v2.14.

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
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

Examples

Example 1:
_params = soundParams 10;

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
Hypoxic125 - c
Posted on May 14, 2023 - 13:57 (UTC)
Wait for sound to end:
private _sound = playSound3D ["A3\Sounds_F\sfx\blip1.wss", player]; waitUntil { soundParams _sound isEqualTo [] };