soundposition(
IDENTIFIER
)

The soundposition( function returns the current playback position (in seconds) of the specified playing sound.


Parameters

This function has one parameter:

identifier – identifier for the sound (sound must already be playing).


Description

This function returns the current playback position (in seconds) of the specified playing sound. The code below could be used to play a long sound, even minutes or hours.

playsound "~/Sounds/2021_05_21_Interview.mp3","IDENTIFIER","Interview"

Later, this code could be used to save the current playback position.

letfileglobal soundBookmark = soundposition("Interview"))

Still later, the controlsound statement could be used to jump back to the saved spot.

controlsound "Position",soundBookmark

Note: The position is a floating point number, so it can be a fractional value.


See Also


History

VersionStatusNotes
10.2NewNew in this version.