# HG changeset patch # User Robert McIntyre # Date 1322937863 21600 # Node ID 5cd9e6c65a937b59652ceacae1d0135bc2be14dd # Parent 388f9d062012e0d994b9d9753b8eb7054da0945c system is shaping up diff -r 388f9d062012 -r 5cd9e6c65a93 src/com/aurellem/capture/examples/Advanced.java --- a/src/com/aurellem/capture/examples/Advanced.java Sat Dec 03 12:18:55 2011 -0600 +++ b/src/com/aurellem/capture/examples/Advanced.java Sat Dec 03 12:44:23 2011 -0600 @@ -5,13 +5,12 @@ import java.io.IOException; import java.lang.reflect.Field; import java.nio.ByteBuffer; -import java.util.logging.Level; -import java.util.logging.Logger; import javax.sound.sampled.AudioFormat; import org.tritonus.share.sampled.FloatSampleTools; +import com.aurellem.capture.AurellemSystemDelegate; import com.aurellem.capture.Capture; import com.aurellem.capture.IsoTimer; import com.aurellem.capture.audio.CompositeSoundProcessor; @@ -34,7 +33,7 @@ import com.jme3.scene.shape.Box; import com.jme3.scene.shape.Sphere; import com.jme3.system.AppSettings; -import com.jme3.system.Natives; +import com.jme3.system.JmeSystem; /** @@ -90,6 +89,7 @@ Advanced app = new Advanced(); AppSettings settings = new AppSettings(true); settings.setAudioRenderer("Send"); + JmeSystem.setSystemDelegate(new AurellemSystemDelegate()); app.setSettings(settings); app.setShowSettings(false); app.setPauseOnLostFocus(false); @@ -220,11 +220,6 @@ audioRenderer.pauseSource(music); } - - - - - public class Dancer implements SoundProcessor { Geometry entity; float scale = 2; @@ -274,7 +269,6 @@ rf.registerSoundProcessor(auxListener, new CompositeSoundProcessor(new Dancer(ear), aux)); - } } diff -r 388f9d062012 -r 5cd9e6c65a93 src/com/aurellem/capture/examples/HelloVideo.java --- a/src/com/aurellem/capture/examples/HelloVideo.java Sat Dec 03 12:18:55 2011 -0600 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -package com.aurellem.capture.examples; - -import java.io.File; -import java.io.IOException; - -import jme3test.helloworld.HelloLoop; - -import com.aurellem.capture.IsoTimer; -import com.aurellem.capture.Capture; -import com.jme3.app.SimpleApplication; - -public class HelloVideo { - - public static void main(String[] ignore) throws IOException { - SimpleApplication app = new HelloLoop(); - File video = File.createTempFile("helloVideo", ".avi"); - app.setTimer(new IsoTimer(60)); - Capture.captureVideo(app, video); - app.start(); - System.out.println(video.getCanonicalPath()); - } -} diff -r 388f9d062012 -r 5cd9e6c65a93 src/com/aurellem/capture/examples/HelloVideoRecording.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/com/aurellem/capture/examples/HelloVideoRecording.java Sat Dec 03 12:44:23 2011 -0600 @@ -0,0 +1,22 @@ +package com.aurellem.capture.examples; + +import java.io.File; +import java.io.IOException; + +import jme3test.helloworld.HelloLoop; + +import com.aurellem.capture.IsoTimer; +import com.aurellem.capture.Capture; +import com.jme3.app.SimpleApplication; + +public class HelloVideoRecording { + + public static void main(String[] ignore) throws IOException { + SimpleApplication app = new HelloLoop(); + File video = File.createTempFile("helloVideo", ".avi"); + app.setTimer(new IsoTimer(60)); + Capture.captureVideo(app, video); + app.start(); + System.out.println(video.getCanonicalPath()); + } +} diff -r 388f9d062012 -r 5cd9e6c65a93 src/com/aurellem/capture/examples/HeloAudioRecording.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/com/aurellem/capture/examples/HeloAudioRecording.java Sat Dec 03 12:44:23 2011 -0600 @@ -0,0 +1,24 @@ +package com.aurellem.capture.examples; + +import java.io.File; +import java.io.IOException; + +import jme3test.helloworld.HelloAudio; + +import com.aurellem.capture.Capture; +import com.aurellem.capture.IsoTimer; +import com.jme3.app.Application; + +public class HeloAudioRecording { + + public static void main(String[] ignore) throws IOException{ + Application app = new HelloAudio(); + File audio = File.createTempFile("JME-simple-audio", ".wav"); + app.setTimer(new IsoTimer(60)); + Capture.captureAudio(app, audio); + app.start(); + System.out.println(audio.getCanonicalPath()); + + } + +}