Mercurial > jmeCapture
diff src/com/aurellem/capture/examples/HelloAudioRecording.java @ 50:8a091a5f48fa
documentation for basic use case
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 03 Dec 2011 13:35:13 -0600 |
parents | fc71e797f4fa |
children | afc437f637bd |
line wrap: on
line diff
1.1 --- a/src/com/aurellem/capture/examples/HelloAudioRecording.java Sat Dec 03 13:22:27 2011 -0600 1.2 +++ b/src/com/aurellem/capture/examples/HelloAudioRecording.java Sat Dec 03 13:35:13 2011 -0600 1.3 @@ -9,6 +9,22 @@ 1.4 import com.aurellem.capture.IsoTimer; 1.5 import com.jme3.app.Application; 1.6 1.7 +/** Recording audio from your Application is simple. If all you 1.8 + * want to do is record Audio, then follow the following steps. 1.9 + * 1.10 + * 1.) Set the Application's timer to an IsoTimer. The framerate is 1.11 + * irrelevant for sound, but must evenly divide 44,100Hz, which is the 1.12 + * frequency at which sound will be recorded. For example 1.13 + * IsoTimer(60) is ok, but IsoTimer(61) is not. 1.14 + * 1.15 + * 2.) Call Capture.captureAudio(yourApplication, target-file) before 1.16 + * calling yourApplication.start() 1.17 + * 1.18 + * That's it! If you have any comments/problems, please PM me on the 1.19 + * jMonkeyEngine forms. My username is bortreb. 1.20 + * 1.21 + * @author Robert McIntyre 1.22 + */ 1.23 public class HelloAudioRecording { 1.24 1.25 public static void main(String[] ignore) throws IOException{ 1.26 @@ -19,5 +35,4 @@ 1.27 app.start(); 1.28 System.out.println(audio.getCanonicalPath()); 1.29 } 1.30 - 1.31 }