Skip to content

Commit

Permalink
cleaned up everything.
Browse files Browse the repository at this point in the history
  • Loading branch information
ichiban committed Sep 12, 2010
1 parent 4aac2e9 commit f821426
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions simple.lisp
@@ -0,0 +1,26 @@

(in-package :jack)

(defvar *client* (client-open "simple" 0 (null-pointer)))
(defvar *input-port* (port-register *client* "in"
+default-audio-type+
+port-is-input+ 0))
(defvar *output-port* (port-register *client* "out"
+default-audio-type+
+port-is-output+ 0))

(when (null-pointer-p *client*)
(error "jack server not running?"))

(defcallback process :int ((nframes :uint32) (arg :pointer))
(declare (ignore arg)
(optimize (speed 3)))
(let ((in (port-get-buffer *input-port* nframes))
(out (port-get-buffer *output-port* nframes)))
(iter (for i from 0 below nframes)
(setf (mem-aref out :uint8 i) (mem-aref in :uint8 i))))
0)

(set-process-callback *client* (callback process) (null-pointer))

(activate *client*)

0 comments on commit f821426

Please sign in to comment.