Jump to content

Beep Player


daslick
 Share

Recommended Posts

I made a test proggy to play beep songs (using the system speaker)... but when I start a song the only way to stop it is to end the program. How can I stop the song's function?

GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        Exit
    Case $msg = $muteunmute
        _stop()
    Case $msg = $next
        if $song = "" then _mario()
        if $song = "mario" then _clockscoldplay()
        if $song = "clockscoldplay" then _mario()
    Case $msg = $previous
        if $song = "" then _clockscoldplay()
        if $song = "mario" then _mario()
        if $song = "clockscoldplay" then _clockscoldplay()
    Case Else
;
    EndSelect
WEnd


;songs
Func _mario()   
    $song = "mario"
    do
        _56(162)
        _56(162)
        _R(54)
        _56(162)
        _R(54)
    Until 1
EndFunc



Func _clockscoldplay()
    $song = "clockscoldplay"
    $count = 1
    Do
        _67(200)
        _62(200)
        _59(200)
        _R(10)
        $count = $count + 1
        Until not $song not = "clockscoldplay" or $count = 8
EndFunc

Func _stop()
    $song = ""
EndFunc

Let me know if you need more info or something.

Thanks EDIT:shortened the songs to save space on page

Edited by daslick
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...