# HG changeset patch # User Robert McIntyre # Date 1320049290 25200 # Node ID 2a525e937d864406115c8bb319c2baa49af22c1d # Parent c969b04fa0dc4ba183c6787b1ff9b77b1fdb4fb9 still debuging. diff -r c969b04fa0dc -r 2a525e937d86 divergence/results.txt --- a/divergence/results.txt Mon Oct 31 00:14:46 2011 -0700 +++ b/divergence/results.txt Mon Oct 31 01:21:30 2011 -0700 @@ -17,5 +17,17 @@ same through divergence. +surprisingly, supporfEFX doesn't affect anything. +When things are off, they only appear to be off by one byte. main +will be at x and aux will be at x+1 or x-1. + +Setting audioNode paramaters changes the severity of the difference +but not its onset. + + +Non-positional sound has no problems. + + +Divergence gets worse the longer things run. diff -r c969b04fa0dc -r 2a525e937d86 divergence/with-supportEFX --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/divergence/with-supportEFX Mon Oct 31 01:21:30 2011 -0700 @@ -0,0 +1,129 @@ +OPENAL-AURELLEM: alc_init_config!! +creating new context via naddListener +-------- +main +0.0 +aux +0.0 +0 +channel -1 +I'm playing! <3 +-------- +main +6.408789E-4 +aux +6.408789E-4 +1 +channel 0 +-------- +main +0.0012512398 +aux +0.0012512398 +2 +channel 0 +-------- +main +0.0018921187 +aux +0.0018921187 +3 +channel 0 +-------- +main +0.0024719615 +aux +0.0024719615 +4 +channel 0 +-------- +main +0.0030212863 +aux +0.0030212863 +5 +channel 0 +-------- +main +0.003540093 +aux +0.003540093 +6 +channel 0 +-------- +main +0.004089418 +aux +0.004089418 +7 +channel 0 +-------- +main +0.0045471885 +aux +0.0045471885 +8 +channel 0 +-------- +main +0.004943923 +aux +0.004913405 +inconsistency detected @ sample 16 +main : -60 +aux : -61 +9 +channel 0 +-------- +main +0.004943923 +aux +0.004882887 +inconsistency detected @ sample 0 +main : -96 +aux : -97 +10 +channel 0 +-------- +main +0.004791333 +aux +0.004760815 +inconsistency detected @ sample 0 +main : -59 +aux : -58 +11 +channel 0 +-------- +main +0.0046082246 +aux +0.0045777066 +inconsistency detected @ sample 0 +main : -96 +aux : -95 +12 +channel 0 +-------- +main +0.0046082246 +aux +0.0045777066 +inconsistency detected @ sample 0 +main : -107 +aux : -108 +13 +channel 0 +-------- +main +0.0044556344 +aux +0.0044251163 +inconsistency detected @ sample 0 +main : -55 +aux : -54 +14 +channel 0 +AL lib: ALc.c:2463: alcCloseDevice(): destroying 1 Context(s) +AL lib: ALc.c:2069: alcDestroyContext(): deleting 64 Source(s) +AL lib: ALc.c:2471: alcCloseDevice(): deleting 1 Buffer(s) diff -r c969b04fa0dc -r 2a525e937d86 divergence/without-supportEFX --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/divergence/without-supportEFX Mon Oct 31 01:21:30 2011 -0700 @@ -0,0 +1,129 @@ +OPENAL-AURELLEM: alc_init_config!! +creating new context via naddListener +-------- +main +0.0 +aux +0.0 +0 +channel -1 +I'm playing! <3 +-------- +main +6.408789E-4 +aux +6.408789E-4 +1 +channel 0 +-------- +main +0.0012512398 +aux +0.0012512398 +2 +channel 0 +-------- +main +0.0018921187 +aux +0.0018921187 +3 +channel 0 +-------- +main +0.0024719615 +aux +0.0024719615 +4 +channel 0 +-------- +main +0.0030212863 +aux +0.0030212863 +5 +channel 0 +-------- +main +0.003540093 +aux +0.003540093 +6 +channel 0 +-------- +main +0.004089418 +aux +0.004089418 +7 +channel 0 +-------- +main +0.0045471885 +aux +0.0045471885 +8 +channel 0 +-------- +main +0.004943923 +aux +0.004913405 +inconsistency detected @ sample 16 +main : -60 +aux : -61 +9 +channel 0 +-------- +main +0.004943923 +aux +0.004882887 +inconsistency detected @ sample 0 +main : -96 +aux : -97 +10 +channel 0 +-------- +main +0.004791333 +aux +0.004760815 +inconsistency detected @ sample 0 +main : -59 +aux : -58 +11 +channel 0 +-------- +main +0.0046082246 +aux +0.0045777066 +inconsistency detected @ sample 0 +main : -96 +aux : -95 +12 +channel 0 +-------- +main +0.0046082246 +aux +0.0045777066 +inconsistency detected @ sample 0 +main : -107 +aux : -108 +13 +channel 0 +-------- +main +0.0044556344 +aux +0.0044251163 +inconsistency detected @ sample 0 +main : -55 +aux : -54 +14 +channel 0 +AL lib: ALc.c:2463: alcCloseDevice(): destroying 1 Context(s) +AL lib: ALc.c:2069: alcDestroyContext(): deleting 64 Source(s) +AL lib: ALc.c:2471: alcCloseDevice(): deleting 1 Buffer(s) diff -r c969b04fa0dc -r 2a525e937d86 src/com/aurellem/capture/audio/AudioSendRenderer.java --- a/src/com/aurellem/capture/audio/AudioSendRenderer.java Mon Oct 31 00:14:46 2011 -0700 +++ b/src/com/aurellem/capture/audio/AudioSendRenderer.java Mon Oct 31 01:21:30 2011 -0700 @@ -173,7 +173,12 @@ //public final static int BYTES_PER_SAMPLE = 4; private ByteBuffer buffer = BufferUtils.createByteBuffer(4096); + private byte[] debug0 = new byte[4096]; + private byte[] debug1 = new byte[4096]; + + public void dispatchAudio(float tpf){ + int samplesToGet = (int) (tpf * outFormat.getSampleRate()); try {latch.await();} catch (InterruptedException e) {e.printStackTrace();} @@ -183,11 +188,24 @@ for (int i = 0; i < this.listeners.size(); i++){ buffer.clear(); audioSend.getSamples(buffer, samplesToGet, i); + if (i == 0 ) buffer.get(debug0); + if (i == 1 ) buffer.get(debug1); SoundProcessor sp = this.soundProcessorMap.get(this.listeners.get(i)); if (null != sp){sp.process(buffer, samplesToGet*outFormat.getFrameSize(), outFormat);} } + for (int i = 0; i < samplesToGet; i++){ + if (debug1[i] != debug0[i]){ + System.out.println("inconsistency detected @ sample " + i); + System.out.println("main : " + debug0[i]); + System.out.println("aux : " + debug1[i]); + + break; + } + + } + } public void update(float tpf){ diff -r c969b04fa0dc -r 2a525e937d86 src/com/aurellem/capture/examples/AdvancedAudio.java --- a/src/com/aurellem/capture/examples/AdvancedAudio.java Mon Oct 31 00:14:46 2011 -0700 +++ b/src/com/aurellem/capture/examples/AdvancedAudio.java Mon Oct 31 01:21:30 2011 -0700 @@ -207,16 +207,14 @@ music = new AudioNode(assetManager, "Sound/Environment/pure.wav", false); rootNode.attachChild(music); - //audioRenderer.playSource(music); - music.setPositional(true); + audioRenderer.playSource(music); + music.setPositional(false); music.setVolume(1f); music.setReverbEnabled(false); music.setMaxDistance(200.0f); music.setRefDistance(1f); music.setRolloffFactor(5f); - - - //audioRenderer.pauseSource(music); + audioRenderer.pauseSource(music); } @@ -350,7 +348,7 @@ //listener.setLocation(loc); //listener.setRotation(rot); System.out.println(countdown); - if (countdown++ == 14) { this.requestClose(false);} + if (countdown++ == 400) { this.requestClose(false);} System.out.println("channel "+ music.getChannel()); //listener.setLocation(cam.getLocation());