Anonymous user
Audio alarm: Difference between revisions
Racket implementation
m (Rexx's closing lang tag was malformed. Now Tcl shows properly) |
(Racket implementation) |
||
Line 34:
end</lang>
=={{header|Racket}}==
Racket does not currently have native mp3 support so this example uses system to call an external application.
<lang racket>#lang racket
(display "Time to wait in seconds: ")
(define time (string->number (read-line)))
(display "File Name: ")
(define file-name (read-line))
(when (file-exists? (string->path (string-append file-name ".mp3")))
(sleep time)
(system* "/usr/bin/mpg123" (string-append file-name ".mp3")))</lang>
=={{header|REXX}}==
===using SLEEP===
|