play-sound should deal with paths

svn: r808
This commit is contained in:
Eli Barzilay 2005-09-09 00:10:40 +00:00
parent bd023260c2
commit bcf8da09fe

View File

@ -55,7 +55,7 @@
(define (play-sound f async?) (define (play-sound f async?)
(if (not (eq? (system-type) 'unix)) (if (not (eq? (system-type) 'unix))
(wx:play-sound f async?) (wx:play-sound f async?)
(let ([f (if (path? f) (path->string f))]) (let ([f (if (path? f) (path->string f) f)])
(unless (string? f) (unless (string? f)
(raise-type-error 'play-sound "string" f)) (raise-type-error 'play-sound "string" f))
(let* ([subpath (path->string (system-library-subpath))] (let* ([subpath (path->string (system-library-subpath))]
@ -77,7 +77,7 @@
(when (and r (string? r)) (when (and r (string? r))
(set-box! b r))) (set-box! b r)))
((if async? (lambda (x) (process x) #t) system) ((if async? (lambda (x) (process x) #t) system)
(format (unbox b) (expand-path f))))))) (format (unbox b) (path->string (expand-path f))))))))
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Timers: ;; Timers: