Mercurial > jmeCapture
annotate src/com/aurellem/capture/examples/Basic.java @ 22:c7a07eefaeea
started work on audio AI
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sun, 30 Oct 2011 01:19:11 -0700 |
parents | be5ac56826be |
children | 5f616cc420dd |
rev | line source |
---|---|
rlm@14 | 1 package com.aurellem.capture.examples; |
rlm@14 | 2 |
rlm@14 | 3 import java.io.File; |
rlm@14 | 4 import java.io.IOException; |
rlm@14 | 5 |
rlm@14 | 6 import jme3test.water.TestPostWater; |
rlm@14 | 7 |
rlm@14 | 8 import com.aurellem.capture.Capture; |
rlm@14 | 9 import com.aurellem.capture.IsoTimer; |
rlm@14 | 10 import com.jme3.app.SimpleApplication; |
rlm@14 | 11 |
rlm@14 | 12 |
rlm@14 | 13 /** |
rlm@14 | 14 * |
rlm@14 | 15 * Demonstrates how to use basic Audio/Video capture with a jMonkeyEngine |
rlm@14 | 16 * application. You can use these techniques to make high quality cutscenes |
rlm@14 | 17 * or demo videos, even on very slow laptops. |
rlm@14 | 18 * |
rlm@14 | 19 * @author Robert McIntyre |
rlm@14 | 20 * |
rlm@14 | 21 */ |
rlm@14 | 22 |
rlm@14 | 23 public class Basic { |
rlm@14 | 24 |
rlm@15 | 25 public static void main(String[] ignore) throws IOException{ |
rlm@15 | 26 File video = File.createTempFile("JME-water-video", ".avi"); |
rlm@15 | 27 File audio = File.createTempFile("JME-water-audio", ".wav"); |
rlm@14 | 28 |
rlm@15 | 29 System.out.println(video.getCanonicalPath()); |
rlm@15 | 30 System.out.println(audio.getCanonicalPath()); |
rlm@14 | 31 |
rlm@14 | 32 SimpleApplication app = new TestPostWater(); |
rlm@14 | 33 app.setTimer(new IsoTimer(60)); |
rlm@14 | 34 app.setShowSettings(false); |
rlm@14 | 35 |
rlm@14 | 36 Capture.captureVideo(app, video); |
rlm@14 | 37 Capture.captureAudio(app, audio); |
rlm@14 | 38 |
rlm@14 | 39 app.start(); |
rlm@14 | 40 } |
rlm@14 | 41 } |