Debian Codegraph @

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

raw
1 ; machine.lsp -- machine/system-dependent definitions
2 ; SGI/IRIX
3
4 (if (not (boundp '*default-sf-format*))
5 (setf *default-sf-format* snd-head-AIFF))
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 (if (not (boundp '*default-plot-file*))
20 (setf *default-plot-file* "points.dat"))
21
22 (defmacro play (expr)
23 `(let ()
24 (s-save-autonorm ,expr NY:ALL *default-sound-file* :play *soundenable*)
25 (r)))
26
27 (defun r ()
28 (play-file *default-sound-file*))
29
30 ; PLAY-FILE -- play a file
31 (defun play-file (name)
32 (system (strcat "sfplay " (soundfilename name))))
33
34
35 ; FULL-NAME-P -- test if file name is a full path or relative path
36 ;
37 ; (otherwise the *default-sf-dir* will be prepended
38 ;
39 (defun full-name-p (filename)
40 (or (eq (char filename 0) #\/)
41 (eq (char filename 0) #\.)))
42
43 (setf *file-separator* #\/)
44
45 (sound-off) ; sgi implementation does not support real-time audio output yet
46