# HG changeset patch # User Robert McIntyre # Date 1322936335 21600 # Node ID 388f9d062012e0d994b9d9753b8eb7054da0945c # Parent 2f129118e2d6fc53fdd1ed71deb46d40cc286b2d adapting to execellent new jmeSystem changes diff -r 2f129118e2d6 -r 388f9d062012 src/com/aurellem/capture/AurellemSystemDelegate.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/com/aurellem/capture/AurellemSystemDelegate.java Sat Dec 03 12:18:55 2011 -0600 @@ -0,0 +1,14 @@ +package com.aurellem.capture; + +import com.aurellem.capture.audio.AudioSendRenderer; +import com.jme3.audio.AudioRenderer; +import com.jme3.system.AppSettings; +import com.jme3.system.JmeDesktopSystem; + +public class AurellemSystemDelegate extends JmeDesktopSystem { + + public AudioRenderer newAudioRenderer(AppSettings settings) { + initialize(settings); + return new AudioSendRenderer(); + } +} \ No newline at end of file diff -r 2f129118e2d6 -r 388f9d062012 src/com/aurellem/capture/Capture.java --- a/src/com/aurellem/capture/Capture.java Wed Nov 30 06:32:36 2011 -0700 +++ b/src/com/aurellem/capture/Capture.java Sat Dec 03 12:18:55 2011 -0600 @@ -14,7 +14,7 @@ import com.jme3.audio.AudioRenderer; import com.jme3.renderer.ViewPort; import com.jme3.scene.Spatial; -import com.jme3.system.AppSettings; +import com.jme3.system.JmeSystem; public class Capture { @@ -56,9 +56,9 @@ public static void captureAudio(final Application app, final File file) throws IOException{ - AppSettings settings = new AppSettings(true); - settings.setAudioRenderer("Send"); - app.setSettings(settings); + + JmeSystem.setSystemDelegate(new AurellemSystemDelegate()); + final WaveFileWriter writer = new WaveFileWriter(file); Callable thunk = new Callable(){ diff -r 2f129118e2d6 -r 388f9d062012 src/com/aurellem/capture/audio/WaveFileWriter.java --- a/src/com/aurellem/capture/audio/WaveFileWriter.java Wed Nov 30 06:32:36 2011 -0700 +++ b/src/com/aurellem/capture/audio/WaveFileWriter.java Sat Dec 03 12:18:55 2011 -0600 @@ -23,8 +23,6 @@ public WaveFileWriter(File targetFile) throws FileNotFoundException{ tos = new TNonSeekableDataOutputStream( new FileOutputStream(targetFile)); - - } public void init(AudioFormat format){ diff -r 2f129118e2d6 -r 388f9d062012 src/com/aurellem/capture/examples/Advanced.java --- a/src/com/aurellem/capture/examples/Advanced.java Wed Nov 30 06:32:36 2011 -0700 +++ b/src/com/aurellem/capture/examples/Advanced.java Sat Dec 03 12:18:55 2011 -0600 @@ -67,7 +67,7 @@ private MotionTrack motionControl; public static void main(String[] args) { - Logger.getLogger("com.jme3").setLevel(Level.OFF); + //Logger.getLogger("com.jme3").setLevel(Level.OFF); Advanced app = new Advanced(); AppSettings settings = new AppSettings(true); settings.setAudioRenderer("Send"); @@ -215,7 +215,7 @@ music.setDirectional(false); music.setMaxDistance(200.0f); music.setRefDistance(1f); - music.setRolloffFactor(1f); + //music.setRolloffFactor(1f); music.setLooping(false); audioRenderer.pauseSource(music); }