1
0
forked from 0ad/0ad

no need to check errors after destroying context, clean up some OpenAL interface calls

This was SVN commit r13371.
This commit is contained in:
stwf 2013-04-25 10:48:34 +00:00
parent 8324e0f665
commit c30f7a40e0
4 changed files with 4 additions and 6 deletions

View File

@ -317,8 +317,6 @@ CSoundManager::~CSoundManager()
if ( m_Context )
alcDestroyContext(m_Context);
AL_CHECK
if ( m_Device )
alcCloseDevice(m_Device);
}

View File

@ -74,7 +74,7 @@ bool CBufferItem::IdleTask()
{
CScopeLock lock(m_ItemMutex);
int proc_state;
alGetSourceiv(m_ALSource, AL_SOURCE_STATE, &proc_state);
alGetSourcei(m_ALSource, AL_SOURCE_STATE, &proc_state);
AL_CHECK
m_ShouldBePlaying = (proc_state != AL_STOPPED);
return (proc_state != AL_STOPPED);

View File

@ -191,7 +191,7 @@ bool CSoundBase::IsPlaying()
{
CScopeLock lock(m_ItemMutex);
int proc_state;
alGetSourceiv(m_ALSource, AL_SOURCE_STATE, &proc_state);
alGetSourcei(m_ALSource, AL_SOURCE_STATE, &proc_state);
AL_CHECK
return (proc_state == AL_PLAYING);
@ -334,7 +334,7 @@ void CSoundBase::FadeToIn(ALfloat newVolume, double fadeDuration)
if (m_ALSource != 0)
{
ALenum proc_state;
alGetSourceiv(m_ALSource, AL_SOURCE_STATE, &proc_state);
alGetSourcei(m_ALSource, AL_SOURCE_STATE, &proc_state);
if (proc_state == AL_PLAYING)
{
m_StartFadeTime = timer_Time();

View File

@ -70,7 +70,7 @@ bool CStreamItem::IdleTask()
if (m_ALSource != 0)
{
int proc_state;
alGetSourceiv(m_ALSource, AL_SOURCE_STATE, &proc_state);
alGetSourcei(m_ALSource, AL_SOURCE_STATE, &proc_state);
AL_CHECK
if (proc_state == AL_STOPPED)