run-program to launch alsaplayer in sbcl

2019-08-09 04:32发布

The sbcl instruction: (run-program "/bin/ls" '() :output *standard-output*) works fine on my box :squeeze _Debian_. However I can't run :

(run-program "/usr/bin/alsaplayer CD.cdda" '() :output :stream)

I think that :out :stream option is not aproppiate for this case, but can someone tell me what are the good options ?

Thanks in advance.

Gérard

标签: sbcl
1条回答
Juvenile、少年°
2楼-- · 2019-08-09 05:03

If you're not interested in the output, try

(run-program "/usr/bin/alsaplayer" '("CD.cdda"))

or, if you still want to use your lisp repl while the music is playing,

(run-program "/usr/bin/alsaplayer" '("CD.cdda") :wait nil)

See SBCL Manual Sec. 7.4.3 Running external programs.

Also, include some output/error message so that people can better diagnose the problem.

查看更多
登录 后发表回答