Difference in sound.play Xojo vs RealStudio

I’m converting a RealStudio project to Xojo. I notice a difference when playing sounds.
In RealStudio I can restart the same sound to play even before it’s finished. In Xojo however it seems to be necessary to first do a Sound.Stop before a Sound.Play, it just won’t restart if the last .Play isn’t finished.
Not a big problem, I just wonder if this behavior was changed on purpose.

Well, the switch from QuickTime to AVFoundation makes a change here.

On the other side, calling play after a sound ended, should start it again. If not, maybe worth a bug report?

you can check if the sound is playing and in that case stop it before call again play

for example you can create an extension method like this one:

sub PlayAlways(extends snd as Sound) if snd.IsPlaying then snd.Stop snd.Play end sub

Still, the behavior is different. You can’t play a sound multiple times, unless you clone it.

you need to clone the sound if you want to play it (and the clone) at the same time

Yes it was.

Real Studio uses QuickTime, which Apple have deprecated.
Xojo use the newer AVFoundation.

Apps that use QuickTime will not work on macOS 10.14