openal-soft icon indicating copy to clipboard operation
openal-soft copied to clipboard

alGetSourcei play state is stopped

Open yangfangfang1204 opened this issue 4 years ago • 1 comments
trafficstars

alGenBuffer(16,m_nBuffer); alGetSourcei(m_nSource,AL_BUFFERS_PROCESSED,&m_iProcessedBufNum); alGetSourcei(m_nSource,AL_SOURCE_STATE,&m_iState);

when m_iProcessedBufNum is 15 , m_iState is 0x1014 ,it stopped。could you tell me why?

yangfangfang1204 avatar Mar 04 '21 03:03 yangfangfang1204

If you have 15 buffers queued, when those 15 buffers become processed the source will automatically stop. Also, when a source is in the stopped state (when it reaches the end of all its buffers, or you call alSourceStop with it), all its buffers are always considered processed, even if you queue more. When the source is in an initial state (when the source is first created, or you call alSourceRewind with it), none of its buffers are marked processed.

kcat avatar Mar 04 '21 07:03 kcat