Hi!
When trying to get the processed buffers on mac osx 10.5.3 (on a macbook) with this code:
1 2
| int [] result = new int[1]; al.alGetSourcei( getSourceID( ), AL.AL_BUFFERS_PROCESSED, result, 0 ); |
the result variable will always contain 0 as value.
but the same code runs fine on a windows machine and returns exactly the count of processed buffers, could it be that there is a little bug in the joal mac os native code?
because all joal libraries i'm using are up to date (v. 1.1.2 universal binaries) and i can hear sounds which don't use the queuing/streaming technique.
edit:
after thinking about what else could go wrong under mac os when using the queuing technique, i thought maybe the function alSourceQueueBuffers() which is used to queue buffers on a source is broken:
1 2 3 4 5 6 7 8 9 10
| public void queueBuffers( OpenALBuffer [] buffers ) { int numBuffers = buffers.length; int [] arr = new int[numBuffers];
for ( int i = 0; i < numBuffers; i++ ) { arr [i] = buffers [i].bufferID; }
al.alSourceQueueBuffers( getSourceID( ), numBuffers, arr, 0 ); } |
and therefore no buffers get queued on the source and when trying to query how many buffers have been processed the function returns 0.
thanks for your help =)
kind regards,
ho