Mercurial > jmeCapture
comparison src/com/aurellem/capture/Capture.java @ 44:388f9d062012
adapting to execellent new jmeSystem changes
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 03 Dec 2011 12:18:55 -0600 |
parents | 784a3f4e6202 |
children | 121b6d7e4d3f |
comparison
equal
deleted
inserted
replaced
43:2f129118e2d6 | 44:388f9d062012 |
---|---|
12 import com.aurellem.capture.video.XuggleVideoRecorder; | 12 import com.aurellem.capture.video.XuggleVideoRecorder; |
13 import com.jme3.app.Application; | 13 import com.jme3.app.Application; |
14 import com.jme3.audio.AudioRenderer; | 14 import com.jme3.audio.AudioRenderer; |
15 import com.jme3.renderer.ViewPort; | 15 import com.jme3.renderer.ViewPort; |
16 import com.jme3.scene.Spatial; | 16 import com.jme3.scene.Spatial; |
17 import com.jme3.system.AppSettings; | 17 import com.jme3.system.JmeSystem; |
18 | 18 |
19 public class Capture { | 19 public class Capture { |
20 | 20 |
21 public static void captureVideo(final Application app, final File file) throws IOException{ | 21 public static void captureVideo(final Application app, final File file) throws IOException{ |
22 | 22 |
54 app.enqueue(thunk); | 54 app.enqueue(thunk); |
55 } | 55 } |
56 | 56 |
57 | 57 |
58 public static void captureAudio(final Application app, final File file) throws IOException{ | 58 public static void captureAudio(final Application app, final File file) throws IOException{ |
59 AppSettings settings = new AppSettings(true); | 59 |
60 settings.setAudioRenderer("Send"); | 60 JmeSystem.setSystemDelegate(new AurellemSystemDelegate()); |
61 app.setSettings(settings); | 61 |
62 final WaveFileWriter writer = new WaveFileWriter(file); | 62 final WaveFileWriter writer = new WaveFileWriter(file); |
63 | 63 |
64 Callable<Object> thunk = new Callable<Object>(){ | 64 Callable<Object> thunk = new Callable<Object>(){ |
65 public Object call(){ | 65 public Object call(){ |
66 AudioRenderer ar = app.getAudioRenderer(); | 66 AudioRenderer ar = app.getAudioRenderer(); |