[gsharp-devel] play.lisp

Ralf Mattes rm at mh-freiburg.de
Tue Jun 26 21:27:44 UTC 2007


On Wed, 2007-06-27 at 01:12 +0400, Stas Boukarev wrote:
> There is a code duplication in play.lisp file in functions play-layer & play-segment.
> New function should also help to deal with compatibility layer.
> 
> And I have no timidity, and I think 
> it is beterr to make player changeable.
> 
> (defvar *midi-player* "timidity")
> (defvar *midi-player-arguments* nil)
> 
> (defun play-midi-file (midifile)
>     #+cmu
>     (ext:run-program *midi-player* (list *midi-player-arguments* midifile))
>     #+sbcl
>     (sb-ext:run-program *midi-player* (list *midi-player-arguments* midifile) :search t)
>     #+clisp
>     (ext:run-program *midi-player* :arguments (list *midi-player-arguments* midifile))
>     #-(or cmu sbcl clisp)
>     (error "write compatibility layer for RUN-PROGRAM"))
> 

I think that '(list *midi-player-arguments* midifile)' is bogus. When
*midi-player-arguments* is set to a list of arguments then the
lambda-list of run-program is wrong. You probably want something like

 (sb-ext:run-program `(,@*midi-player-arguments* ,midifile) ...

Cheers, Ralf Mattes





More information about the gsharp-devel mailing list