문제

I could not find detailed explanation about this function. What I want to know now is that:

Will this function block current thread? Or it just tells the device to start playing audio asynchronously any returns at once?

도움이 되었습니까?

해결책

Yes, the code which wraps your call to alSourcePlay is blocking so wants to be in its own thread. OpenAL has its own event loop to buffer up and render sound into the audio device(s).

Typically you want a separate thread to make available your source media (thread 1) and another thread for your OpenAL logic (thread 2). This is in addition to your UI thread (thread 3) if any.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top