Play Sounds and Pause

I did a small project because there is as strange things.
I loop to play many times the same sound following by a Pause. I don’t wait : while MySound.IsPlaying because I want to wait less. The following sound can play before the previous finish. Then I wait while Ticks+Delay .

If you download the small project:
TestPauseSound
The checkbox Play Sound (instead of Beep) should be checked by default but it is not, then please check it. (is it a bug?).
Click Ok, you will ear 3 sounds.
Move the slider Delay (1/60 sec) from 3 to 20 (1/3 second) and you will ear only one sound (on Mac Intel Mojave, on Windows it works as expected). We should ear 3 sounds.
It works as expected if we play a Beep instead of the sound.

In my project I did differently, I use a Timer and it works as I expect. But this small project should work! No?

its a bug again, was fixed last year and appear again^^
i made a feedback but it was closed.
xojo staff are not insterested to fix bugs independently.
maybe they autoclose all tickets by rule.

i not have a mac for testing but something like this

While System.Ticks < (TicksStart + Delai)
Wend

it is forbidden :wink:
it is somehow a short circuit.
you could test with Thread.YieldToNext

@William_Yu
his example TestPauseSound lost the desktop checkbox state that was set in designer. (at 2021r3)
if you change super to old checkbox this checked state is ok.

Sounds like a bug that’s been fixed: <https://xojo.com/issue/67140>

@William_Yu great :slight_smile:
if Xojo Ide tell me there is an update to 3.1 does that means i have a license for?

Not typically, but there have been times that we’ve extended the license period for some releases.

1 Like

I wasn’t at home, I just came back. I wanted to create a bug report for the checkbox set to true in the IDE but which stay uncheck when build. I can’t open your case 67140, the case is loading indefinitely. Is it THIS bug or another one? Because the title “API2 issue when converting from API1” does not tell me if it is this problem.

Edit : I reach to open the case, if I well understand the case is fixed.

@William_Yu
i updated from 3 to 3.1 but this bug is still there.
i removed all from his example, it is only the lonely dekstopcheckbox.
seems a converting go wrong from older to newer xojo version.
if you add a new checkbox it is ok.


Sorry I should have clarified that this bug has been fixed in a future version of Xojo. If you’re on the Testers channel you can try that build which should include this fix.

2 Likes

But talking about beta versions is prohibited in non-tester channels. Logically, you should edit your post.