How to play a sound right after another sound has ended?

I can’t guarantee this by checking if the sound was stopped in my program because the sounds are processed in different threads, isn’t that so?

Thus, the problem arises when I want to be 100% sure that as soon as the sound stops playing, a new sound will immediately begin after it without any delays.

The second sound will be a cyclic type of sound, so I cannot just glue the two sounds together.

How can i do this?

+3
source share
1 answer

- OpenAL, , . , , , . , " , ", , . , , , , , , .

, alSourceQueueBuffers () .

.

alGetSourcei(source, AL_BUFFERS_PROCESSED, &num_done). , , .

, , . , - . , , , /unqueueing, , .

+2

All Articles