From 8b3ec6929ce3245719c22be67e3f70b9e3bb03fb Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 24 Oct 2001 16:19:37 +0000 Subject: [PATCH] . original commit: 468963f26c5797ace94de7ef036d4082d24ddb34 --- collects/mred/mred.ss | 29 ++++++++++++++--------------- notes/mred/HISTORY | 6 +++++- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/collects/mred/mred.ss b/collects/mred/mred.ss index 3691c98d..a54bc1be 100644 --- a/collects/mred/mred.ss +++ b/collects/mred/mred.ss @@ -5440,21 +5440,20 @@ (raise-type-error 'play-sound "string" f)) (let* ([subpath (system-library-subpath)] [make-pattern (lambda (s) (string-append ".*" s ".*"))] - [b - (box - (cond - [(regexp-match (make-pattern "linux") subpath) - ; use play interface to sox - "play ~s"] - [(regexp-match (make-pattern "solaris") subpath) - "audioplay ~s"] - [(regexp-match (make-pattern "ppc-macosx") subpath) - 'use-play-sound] - [else - (raise-mismatch-error - 'play-sound - "Don't know how to play sounds on architecture" - subpath)]))]) + [b (box + (cond + [(regexp-match (make-pattern "linux") subpath) + ;; use play interface to sox + "play ~s"] + [(regexp-match (make-pattern "solaris") subpath) + "audioplay ~s"] + [(regexp-match (make-pattern "ppc-macosx") subpath) + 'use-play-sound] + [else + (raise-mismatch-error + 'play-sound + "not supported by default on this platform" + subpath)]))]) (if (eq? (unbox b) 'use-play-sound) (wx:play-sound f async?) (begin diff --git a/notes/mred/HISTORY b/notes/mred/HISTORY index 1248491f..7ed8926b 100644 --- a/notes/mred/HISTORY +++ b/notes/mred/HISTORY @@ -4,9 +4,13 @@ Version 199.26: * Added a `use-paper-bbox?' initialization argument to post-script-dc%. When it's #t (the default is #f), the bounding box for the PostScript output is determined by the paper size (from - `current-ps-setup'), instead of from the location of drawing + `current-ps-setup'), instead of from the history of drawing commands. + * `play-sound' in Linux now uses the `play' function, and under + Solaris it uses the `audioplay' function. Default commands for + other OSes are welcome. + Version 199.25: * Restricted all label string arguments to <= 200 characters (so that