comparison src/com/aurellem/capture/examples/AdvancedAudio.java @ 38:adeb88787645

fixed all problems for 16 bit mono output
author Robert McIntyre <rlm@mit.edu>
date Mon, 31 Oct 2011 07:43:44 -0700
parents 094a92b556a2
children 784a3f4e6202
comparison
equal deleted inserted replaced
37:094a92b556a2 38:adeb88787645
206 private void initAudio() { 206 private void initAudio() {
207 207
208 music = new AudioNode(assetManager, "Sound/Environment/sqr-1kHz.wav", false); 208 music = new AudioNode(assetManager, "Sound/Environment/sqr-1kHz.wav", false);
209 209
210 rootNode.attachChild(music); 210 rootNode.attachChild(music);
211 //audioRenderer.playSource(music); 211 audioRenderer.playSource(music);
212 //music.setPositional(true); 212 music.setPositional(true);
213 //music.setVolume(1f); 213 music.setVolume(1f);
214 //music.setReverbEnabled(false); 214 music.setReverbEnabled(false);
215 //music.setDirectional(false); 215 music.setDirectional(false);
216 //music.setMaxDistance(200.0f); 216 music.setMaxDistance(200.0f);
217 //music.setRefDistance(1f); 217 music.setRefDistance(1f);
218 //music.setRolloffFactor(1f); 218 music.setRolloffFactor(1f);
219 //music.setLooping(false); 219 music.setLooping(false);
220 //audioRenderer.pauseSource(music); 220 audioRenderer.pauseSource(music);
221 221
222 } 222 }
223 223
224 224
225 225
356 listener.setRotation(new Quaternion().fromAngleAxis(0, music.getLocalTranslation().subtract(listener.getLocation()))); 356 listener.setRotation(new Quaternion().fromAngleAxis(0, music.getLocalTranslation().subtract(listener.getLocation())));
357 audioRenderer.updateListenerParam(listener, ListenerParam.Rotation); 357 audioRenderer.updateListenerParam(listener, ListenerParam.Rotation);
358 358
359 System.out.println(countdown); 359 System.out.println(countdown);
360 360
361 if (countdown++ == 700) { this.requestClose(false);} 361 if (countdown++ == 300) { this.requestClose(false);}
362 362
363 //System.out.println("channel "+ music.getChannel()); 363 //System.out.println("channel "+ music.getChannel());
364 //listener.setLocation(cam.getLocation()); 364 //listener.setLocation(cam.getLocation());
365 //listener.setRotation(cam.getRotation()); 365 //listener.setRotation(cam.getRotation());
366 //auxListener.setLocation(loc); 366 //auxListener.setLocation(loc);