how i can loop a soundfile?

Discussion in 'Questions (Windows Mobile)' started by wilhelmeros, Jan 3, 2009.

  1. wilhelmeros

    wilhelmeros New Member Licensed User

    Hi,
    i am a new user and want that a soundfile repeats, till i click another button.
    How i must this write in code
    Thank you
     
  2. Cableguy

    Cableguy Expert Licensed User

    You will need the Hekkus dll to controls when the sound file ends...
    See the dll listings..in my signature
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    If you know the length of the sound file, then you can use a timer to start the sound each time.
    Something like:
    Code:
    Sub Globals

    End Sub

    Sub App_Start
        Form1.Show
        timer1.Interval = SOUND_LENGTH_IN_MILLISECONDS
    End Sub
    Sub btnStart_Click
        timer1.Enabled = 
    True
    End Sub
    Sub btnStop_Click
        timer1.Enabled = 
    False
    End Sub
    Sub Timer1_Tick
        Sound(
    "sound.wav")
    End Sub
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice