Sound.Clone

From Xojo Documentation

Revision as of 22:57, 29 July 2019 by Gperlman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Method

Sound.Clone() As Sound

New in 5.5

Supported for all project types and targets.

Returns a clone of the sound as a Sound, but can be played, stopped, and modified independently of the original sound.

Notes

Use Clone instead of opening the same sound file twice, because Clone is likely to be substantially more efficient.

Example

This example clones a sound that has been added to the project and plays it.

Var mySound As New Sound
mySound= chimes.Clone
mySound.pan = pan.Value
mySound.volume = VolumeValue.Value
mySound.Play