Need urgent help! How to play audioClip ".wav" from a certain time?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
royF
Posts: 13
Joined: Mon Oct 10, 2022 10:48 pm

Need urgent help! How to play audioClip ".wav" from a certain time?

Post by royF » Mon Oct 10, 2022 10:59 pm

How to play audioClip ".wav" from a certain time?

For example, I want to play the music from minute 01:20?

Thanks!!

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Need urgent help! How to play audioClip ".wav" from a certain time?

Post by Klaus » Tue Oct 11, 2022 9:10 am

Hi royF,

welcome to the forum!

You will need to use a PLAYER object for this, the "play audioclip xxx" command does not support this.
1. Set the filename of the player object to your WAV file.
2. Then if you want to start the sound you need to forward to 1:20, maybe in a button or when- and wherever you start the sound:

Code: Select all

...
## timescale = units per seconds in movie or sound:
put the timescale of player "your wav sound here" into tTScale
## Forward 80 seconds:
put round(80 * tTScale) into tCurrentTime
set the currenttime of player "your wav sound here" to tCurrentTime
start player "your wav sound here"
...
Best

Klaus

P.S.
Personal note: A little "Hello" would not have hurt for the very first posting.

royF
Posts: 13
Joined: Mon Oct 10, 2022 10:48 pm

Re: Need urgent help! How to play audioClip ".wav" from a certain time?

Post by royF » Wed Oct 12, 2022 11:48 am

Thanks You!!! :D

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”