Sound from middle

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
areo
Posts: 2
Joined: Wed Feb 02, 2022 11:53 pm

Sound from middle

Post by areo » Wed Feb 02, 2022 11:59 pm

Hi,
I am new here. Is there a way to start playing an audio file from the middle somewhere? Something like "start from time 1:23 and end at 4:56 point."
Thank

SWEdeAndy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 324
Joined: Sat Aug 16, 2008 9:48 am
Contact:

Re: Sound from middle

Post by SWEdeAndy » Thu Feb 03, 2022 10:38 am

If you are using the player object (desktop) then look up playSelection, startTime and endTime in the LC dictionary.
Set the playSelection to true and then set startTime and endTime, to make the player only play the intervals in between.

The number of intervals per second is specified by the player's timeScale property. The total number of intervals is given in the player's duration property.

If your question relates to a mobile player, then look up mobileControlSet and the player specific "currentTime", which is the current position of the playhead, measured in milliseconds. For iOS mobileControlSet also has startTime and endTime settings.
Andreas Bergendal
Independent app and system developer
Free LC dev tools: https://github.com/wheninspace
(WIS_WebDeployHelper, WIS_ScriptDependencies, WIS_BrowserAnimation)
WhenInSpace: https://wheninspace.com

areo
Posts: 2
Joined: Wed Feb 02, 2022 11:53 pm

Re: Sound from middle

Post by areo » Thu Feb 03, 2022 5:31 pm

Thank you Andy... Such concise and coherent response. Cheers

Post Reply