# HG changeset patch # User Robert McIntyre # Date 1322941888 21600 # Node ID d799a0278cc90c5c474a631cd081b2bfb9235f58 # Parent 6a1b28f060e6e828aa37ead49762c13d22ce8ba0 advanced documentation. diff -r 6a1b28f060e6 -r d799a0278cc9 src/com/aurellem/capture/audio/CompositeSoundProcessor.java --- a/src/com/aurellem/capture/audio/CompositeSoundProcessor.java Sat Dec 03 13:42:30 2011 -0600 +++ b/src/com/aurellem/capture/audio/CompositeSoundProcessor.java Sat Dec 03 13:51:28 2011 -0600 @@ -10,7 +10,6 @@ * in which it was constructed. * * @author Robert McIntyre - * */ public class CompositeSoundProcessor implements SoundProcessor{ diff -r 6a1b28f060e6 -r d799a0278cc9 src/com/aurellem/capture/audio/WaveFileWriter.java --- a/src/com/aurellem/capture/audio/WaveFileWriter.java Sat Dec 03 13:42:30 2011 -0600 +++ b/src/com/aurellem/capture/audio/WaveFileWriter.java Sat Dec 03 13:51:28 2011 -0600 @@ -13,6 +13,12 @@ import org.tritonus.share.sampled.file.TDataOutputStream; import org.tritonus.share.sampled.file.TNonSeekableDataOutputStream; +/** + * A SoundProcessor that sends all sound data it receives to a wav file. + * + * @author Robert McIntyre + */ + public class WaveFileWriter implements SoundProcessor { public File targetFile; diff -r 6a1b28f060e6 -r d799a0278cc9 src/com/aurellem/capture/examples/Advanced.java --- a/src/com/aurellem/capture/examples/Advanced.java Sat Dec 03 13:42:30 2011 -0600 +++ b/src/com/aurellem/capture/examples/Advanced.java Sat Dec 03 13:51:28 2011 -0600 @@ -51,18 +51,27 @@ * that can each hear the world from their own perspective. * * @author Robert McIntyre - * */ public class Advanced extends SimpleApplication { - private Geometry bell; - private Geometry ear1; - private Geometry ear2; - private Geometry ear3; - private AudioNode music; - private MotionTrack motionControl; - + /** + * You will see three grey cubes, a blue sphere, and a path + * which circles each cube. The blue sphere is generating a + * constant monotone sound as it moves along the track. Each + * cube is listening for sound; when a cube hears sound whose + * intensity is greater than a certain threshold, it changes + * its color from grey to green. + * + * Each cube is also saving whatever it hears to a file. The + * scene from the perspective of the viewer is also saved to + * a video file. When you listen to each of the sound files + * alongside the video, the sound will get louder when the + * sphere approaches the cube that generated that sound file. + * This shows that each listener is hearing the world from + * its own perspective. + * + */ public static void main(String[] args) { Advanced app = new Advanced(); AppSettings settings = new AppSettings(true); @@ -81,6 +90,14 @@ app.start(); } + + private Geometry bell; + private Geometry ear1; + private Geometry ear2; + private Geometry ear3; + private AudioNode music; + private MotionTrack motionControl; + private Geometry makeEar(Node root, Vector3f position){ Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md"); Geometry ear = new Geometry("ear", new Box(1.0f, 1.0f, 1.0f));