Search code examples
windev

Infinite loop when playing a sound


I want a sound to be played in a loop until an on/off button is off.

I use this code:

WHILE BTN_Bouton73..Enfoncé=1
    Son(S_chemin+"H3.wav",sonBoucle)
END

But it goes into an infinite loop!


Solution

  • try with

    WHILE BTN_Bouton73..Enfoncé=1
        Son(S_chemin+"H3.wav",sonBoucle)
        Multitask(-1)
    END
    

    I think you could realese button to stop

    It give control back to Windows : see documentation