Debian Codegraph @

lib-src/libnyquist/nyquist/sys/unix/pmax/system.lsp

raw
1 ; machine.lsp -- machine/system-dependent definitions
2 ; rs6000
3
4 (if (not (boundp '*default-sf-format*))
5 (setf *default-sf-format* snd-head-none))
6
7 (if (not (boundp '*default-sound-file*))
8 (compute-default-sound-file))
9
10 (if (not (boundp '*default-sf-dir*))
11 (setf *default-sf-dir* "/tmp/"))
12
13 (if (not (boundp '*default-sf-mode*))
14 (setf *default-sf-mode* snd-mode-pcm))
15
16 (if (not (boundp '*default-sf-bits*))
17 (setf *default-sf-bits* 16))
18
19 ; local definition for play
20
21
22 (defun p6k ()
23 (system (format nil
24 "/usr/itc/projects/depot/tactus/bin/acpaplay ~A/~A < playparms"
25 *default-sf-dir*
26 *default-sound-file*)))
27
28
29 (defmacro play (expr)
30 `(prog (specs playparms)
31 (setf specs (s-save ',expr 1000000000 *default-sound-file*))
32 (setf playparms (open "playparms" :direction :output))
33 (format playparms "~A~%16~%2~%~A~%" (car specs) (cadr specs))
34 (close playparms)
35 (p6k)))
36
37