com.aurellem.capture.examples
Class Advanced

java.lang.Object
  extended by com.jme3.app.Application
      extended by com.jme3.app.SimpleApplication
          extended by com.aurellem.capture.examples.Advanced
All Implemented Interfaces:
com.jme3.system.SystemListener

public class Advanced
extends com.jme3.app.SimpleApplication

Demonstrates advanced use of the audio capture and recording features. Multiple perspectives of the same scene are simultaneously rendered to different sound files. A key limitation of the way multiple listeners are implemented is that only 3D positioning effects are realized for listeners other than the main LWJGL listener. This means that audio effects such as environment settings will *not* be heard on any auxiliary listeners, though sound attenuation will work correctly. Multiple listeners as realized here might be used to make AI entities that can each hear the world from their own perspective.

Author:
Robert McIntyre

Nested Class Summary
 class Advanced.Dancer
           
 
Field Summary
 
Fields inherited from class com.jme3.app.SimpleApplication
flyCam, fpsText, frameCounter, guiFont, guiNode, INPUT_MAPPING_CAMERA_POS, INPUT_MAPPING_EXIT, INPUT_MAPPING_HIDE_STATS, INPUT_MAPPING_MEMORY, rootNode, secondCounter, showSettings, statsView
 
Fields inherited from class com.jme3.app.Application
assetManager, audioRenderer, cam, context, guiViewPort, inputEnabled, inputManager, joyInput, keyInput, listener, mouseInput, paused, pauseOnFocus, renderer, renderManager, settings, speed, stateManager, timer, touchInput, viewPort
 
Constructor Summary
Advanced()
           
 
Method Summary
static void main(java.lang.String[] args)
          You will see three grey cubes, a blue sphere, and a path which circles each cube.
 void simpleInitApp()
           
 void simpleUpdate(float tpf)
           
 
Methods inherited from class com.jme3.app.SimpleApplication
getFlyByCamera, getGuiNode, getRootNode, initialize, isShowSettings, loadFPSText, loadStatsView, setDisplayFps, setDisplayStatView, setShowSettings, simpleRender, start, update
 
Methods inherited from class com.jme3.app.Application
createCanvas, destroy, destroyInput, enqueue, gainFocus, getAssetManager, getAudioRenderer, getCamera, getContext, getGuiViewPort, getInputManager, getListener, getRenderer, getRenderManager, getStateManager, getViewPort, handleError, isPauseOnLostFocus, loseFocus, requestClose, reshape, restart, setAssetManager, setPauseOnLostFocus, setSettings, setTimer, start, startCanvas, startCanvas, stop, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Advanced

public Advanced()
Method Detail

main

public static void main(java.lang.String[] args)
You will see three grey cubes, a blue sphere, and a path which circles each cube. The blue sphere is generating a constant monotone sound as it moves along the track. Each cube is listening for sound; when a cube hears sound whose intensity is greater than a certain threshold, it changes its color from grey to green. Each cube is also saving whatever it hears to a file. The scene from the perspective of the viewer is also saved to a video file. When you listen to each of the sound files alongside the video, the sound will get louder when the sphere approaches the cube that generated that sound file. This shows that each listener is hearing the world from its own perspective.


simpleInitApp

public void simpleInitApp()
Specified by:
simpleInitApp in class com.jme3.app.SimpleApplication

simpleUpdate

public void simpleUpdate(float tpf)
Overrides:
simpleUpdate in class com.jme3.app.SimpleApplication