Removed hack that caused audio state to become unsynced from the render state. This hack also disabled the anti-click audio mechanism

This commit is contained in:
2014-06-05 22:06:16 -07:00
parent 1232c3da16
commit d067ddda5f

View File

@@ -1508,19 +1508,7 @@ void KRAudioManager::setGlobalAmbientGain(float gain)
void KRAudioManager::startFrame(float deltaTime) void KRAudioManager::startFrame(float deltaTime)
{ {
static unsigned long trackCount = 0; m_mutex.lock();
static unsigned long trackMissed = 0;
trackCount++;
if (trackCount > 200) {
// printf("Missed %ld out of 200 try_lock attempts on audio startFrame\n", trackMissed);
trackCount = 0;
trackMissed = 0;
}
if (!m_mutex.try_lock()) {
trackMissed++;
return; // if we are rendering audio don't update audio state
} // NOTE: this misses anywhere from 0 to to 30 times out of 200 on the iPad2
// ----====---- Determine Ambient Zone Contributions ----====---- // ----====---- Determine Ambient Zone Contributions ----====----
m_ambient_zone_weights.clear(); m_ambient_zone_weights.clear();