I am not aware of any function in OpenAL that would let you do such a thing direcly, e.g. by blocking or notifying you, so gapless playback in a way as you said would be possible. Any solution like "sleep for the duration of the first sound, then start the second" is bound to fail, because sleep is not reliable. Checking repeatedly whether the source has stopped playing will not work either, because at the time you see that the source is done, there is already an audible gap.
However, you can get this to work indirectly by using alSourceQueueBuffers
once with the first sound, and once with the second (looping) sound.
Start playing the source.
Then regularly call alGetSourcei(source, AL_BUFFERS_PROCESSED, &num_done)
. You don't need to call it all the time, just more often than the duration of your loop sound.
If this tells you that a buffer is done, unqueue it. That's the first sound done, and the second one is playing right now. Now, quickly queue the buffer holding the second sound again, and keep queueing/unqueueing as long as you want the sound to loop.