Sound.Clone

From Xojo Documentation

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