PDA

View Full Version : Simple OpenAL Problem




Soulstorm
Nov 9, 2009, 01:17 PM
I am writting an application on the iPhone which makes heavy use of OpenAL. I have loaded some sounds looping, and everything is fine, until I use alGetSourcef to obtain the current time offset of a sound:


- (float)timeOffset
{
ALfloat tOffset;
alGetSourcef(source, AL_SEC_OFFSET, &tOffset);
//NSLog(@"%f", tOffset);
return tOffset;
}


The problem is that the value returned is rounded to the nearest value! I only get results like 1.000000, 2.000000, 3.000000!

Can anyone help me on this?



KoolStar
Nov 9, 2009, 08:27 PM
try using %g in the nslog to get the non rounded value.

Soulstorm
Nov 10, 2009, 02:07 AM
try using %g in the nslog to get the non rounded value.

Nope... :( This gave me the same results...!