我正在使用这样的东西来开始循环声音:
if (m_pSource == OS_INVALID_SOUND)
{
alGenSources(1, &m_pSource);AL_CHECK
alSourcei(m_pSource, AL_BUFFER, m_pBuffer);
if (Is3D())
{
SetMinDistance(m_minDistance);
SetMaxDistance(m_maxDistance);
}
if (IsLooping() && !IsStreamming())
{
alSourcei(m_pSource, AL_LOOPING, AL_TRUE);
}
}
if (m_pSource != OS_INVALID_SOUND)
{
alSourcePlay(m_pSource);AL_CHECK
}
然后在某些时候我使用:
alSourcePause(m_pSource);AL_CHECK
停止声音,然后:
alSourcePlay(m_pSource);AL_CHECK
再次重新启动它。一切都按预期工作,除了最后一次播放后声音没有重新开始。任何人都知道什么会导致这种情况?或者如果我做错了什么?
谢谢。