diff options
author | Joerg Mueller <nexyon@gmail.com> | 2010-12-22 13:51:34 +0300 |
---|---|---|
committer | Joerg Mueller <nexyon@gmail.com> | 2010-12-22 13:51:34 +0300 |
commit | f08fb046ceee8f69dd3fc9964a942509fe651bec (patch) | |
tree | 6dae436536b479fa5301477e08547b60e9d7e693 /intern/audaspace/OpenAL | |
parent | 088f35787f60950efd1da8455bc392529fefa37e (diff) |
Audio:
* Improve Jack Transport responsiveness.
* Added minor error checking to OpenAL.
Diffstat (limited to 'intern/audaspace/OpenAL')
-rw-r--r-- | intern/audaspace/OpenAL/AUD_OpenALDevice.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp b/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp index a87a4ad5eef..5df7ec4fb0c 100644 --- a/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp +++ b/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp @@ -128,13 +128,15 @@ void AUD_OpenALDevice::updateStreams() ALint info; AUD_DeviceSpecs specs = m_specs; + ALCenum cerr; while(1) { lock(); alcSuspendContext(m_context); - + cerr = alcGetError(m_device); + if(cerr == ALC_NO_ERROR) { // for all sounds for(AUD_HandleIterator it = m_playingSounds->begin(); it != m_playingSounds->end(); it++) @@ -253,12 +255,12 @@ void AUD_OpenALDevice::updateStreams() alSourcePlay(sound->source); } } - } - alcProcessContext(m_context); + alcProcessContext(m_context); + } // stop thread - if(m_playingSounds->empty()) + if(m_playingSounds->empty() || (cerr != ALC_NO_ERROR)) { unlock(); m_playing = false; |