Simple OpenAL Problem

Discussion in 'iPhone/iPad Programming' started by Soulstorm, Nov 9, 2009.

  1. macrumors 68000

    Soulstorm

    Joined:
    Feb 1, 2005
    #1
    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:

    Code:
    - (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?
     
  2. macrumors demi-god

    KoolStar

    Joined:
    Oct 16, 2006
    Location:
    Kentucky
    #2
    try using %g in the nslog to get the non rounded value.
     
  3. thread starter macrumors 68000

    Soulstorm

    Joined:
    Feb 1, 2005
    #3
    Nope... :( This gave me the same results...!
     

Share This Page