pseudoscholastic
darcs-hash:20050306124728-2648a-e3eb0f8e6157cd343a9b7b7fe114b5894ceb5cf7.gz
This commit is contained in:
parent
c22a4e1389
commit
271545fbad
1 changed files with 27 additions and 26 deletions
9
osc.lisp
9
osc.lisp
|
@ -17,7 +17,7 @@
|
||||||
;;
|
;;
|
||||||
;; requirements
|
;; requirements
|
||||||
;;
|
;;
|
||||||
;; dependent on sbcl for float encoding, other suggestions welcome.
|
;; dependent on sbcl or cmucl for float encoding, other suggestions welcome.
|
||||||
;;
|
;;
|
||||||
;; commentary
|
;; commentary
|
||||||
;;
|
;;
|
||||||
|
@ -57,6 +57,8 @@
|
||||||
;; - in-package'd
|
;; - in-package'd
|
||||||
;; 2005-03-01
|
;; 2005-03-01
|
||||||
;; - fixed address string bug
|
;; - fixed address string bug
|
||||||
|
;; 2005-0305
|
||||||
|
;; - 'declare' scattering and other optimisations
|
||||||
|
|
||||||
(defpackage :osc
|
(defpackage :osc
|
||||||
(:use :cl)
|
(:use :cl)
|
||||||
|
@ -66,7 +68,7 @@
|
||||||
|
|
||||||
(in-package :osc)
|
(in-package :osc)
|
||||||
|
|
||||||
(declaim (optimize (speed 2) (safety 1)))
|
(declaim (optimize (speed 3) (safety 1)))
|
||||||
|
|
||||||
;;;;;; ; ;; ; ; ; ; ; ; ;
|
;;;;;; ; ;; ; ; ; ; ; ; ;
|
||||||
;;
|
;;
|
||||||
|
@ -112,7 +114,6 @@
|
||||||
(cat lump
|
(cat lump
|
||||||
(pad (padding-length (length lump)))))))
|
(pad (padding-length (length lump)))))))
|
||||||
|
|
||||||
|
|
||||||
(defun encode-data (data)
|
(defun encode-data (data)
|
||||||
"encodes data in a format suitable for an OSC message"
|
"encodes data in a format suitable for an OSC message"
|
||||||
(let ((lump (make-array 0 :adjustable t :fill-pointer t)))
|
(let ((lump (make-array 0 :adjustable t :fill-pointer t)))
|
||||||
|
@ -127,7 +128,6 @@
|
||||||
lump)))
|
lump)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;;;;;; ; ;; ; ; ; ; ; ; ;
|
;;;;;; ; ;; ; ; ; ; ; ; ;
|
||||||
;;
|
;;
|
||||||
;; decoding OSC messages
|
;; decoding OSC messages
|
||||||
|
@ -255,6 +255,7 @@
|
||||||
"determines the length required for a padded osc string"
|
"determines the length required for a padded osc string"
|
||||||
(declare (type simple-string string))
|
(declare (type simple-string string))
|
||||||
(let ((n (length string)))
|
(let ((n (length string)))
|
||||||
|
(declare (type fixnum n))
|
||||||
(+ n (padding-length n))))
|
(+ n (padding-length n))))
|
||||||
|
|
||||||
(defun padding-length (s)
|
(defun padding-length (s)
|
||||||
|
|
Loading…
Reference in a new issue