Search code examples
iphoneaudiodelayopenal

Play OpenAL source not from the beginning of the soundclip?


It sounds easy, please let me know.

Have alSourcePlay(sourceID); any additional parameters? Or something to set before send alSourcePlay?

I want to play it starting from various timecodes within the sopurce's length.

Thanks in advance.


Solution

  • Two seconds offset:

    alSourcef(sourceID, AL_SEC_OFFSET, 2.0);
    

    Thanks for me.