Mercurial > cortex
comparison org/hearing.org @ 317:bb3f8a4af87f
removed references to defvar from clojure.contrib.def since the def from 1.4 now allows for docstrings
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Tue, 28 Feb 2012 14:04:21 -0600 |
parents | 2c7fbcbd5ebb |
children | 702b5c78c2de |
comparison
equal
deleted
inserted
replaced
316:2c7fbcbd5ebb | 317:bb3f8a4af87f |
---|---|
832 listeners, =update-listener-velocity!= ensures that this velocity | 832 listeners, =update-listener-velocity!= ensures that this velocity |
833 information is always up-to-date. | 833 information is always up-to-date. |
834 | 834 |
835 #+name: hearing-ears | 835 #+name: hearing-ears |
836 #+begin_src clojure | 836 #+begin_src clojure |
837 (defvar | 837 (def |
838 ^{:arglists '([creature])} | 838 ^{:doc "Return the children of the creature's \"ears\" node." |
839 :arglists '([creature])} | |
839 ears | 840 ears |
840 (sense-nodes "ears") | 841 (sense-nodes "ears")) |
841 "Return the children of the creature's \"ears\" node.") | 842 |
842 | 843 |
843 (defn update-listener-velocity! | 844 (defn update-listener-velocity! |
844 "Update the listener's velocity every update loop." | 845 "Update the listener's velocity every update loop." |
845 [#^Spatial obj #^Listener lis] | 846 [#^Spatial obj #^Listener lis] |
846 (let [old-position (atom (.getLocation lis))] | 847 (let [old-position (atom (.getLocation lis))] |
1138 listeners at different positions in the same world. Automatically | 1139 listeners at different positions in the same world. Automatically |
1139 reads ear-nodes from specially prepared blender files and | 1140 reads ear-nodes from specially prepared blender files and |
1140 instantiates them in the world as simulated ears." | 1141 instantiates them in the world as simulated ears." |
1141 {:author "Robert McIntyre"} | 1142 {:author "Robert McIntyre"} |
1142 (:use (cortex world util sense)) | 1143 (:use (cortex world util sense)) |
1143 (:use clojure.contrib.def) | |
1144 (:import java.nio.ByteBuffer) | 1144 (:import java.nio.ByteBuffer) |
1145 (:import java.awt.image.BufferedImage) | 1145 (:import java.awt.image.BufferedImage) |
1146 (:import org.tritonus.share.sampled.FloatSampleTools) | 1146 (:import org.tritonus.share.sampled.FloatSampleTools) |
1147 (:import (com.aurellem.capture.audio | 1147 (:import (com.aurellem.capture.audio |
1148 SoundProcessor AudioSendRenderer)) | 1148 SoundProcessor AudioSendRenderer)) |