Make audio thread control flags safe

This commit is contained in:
Pedro J. Estébanez
2022-08-19 10:38:13 +02:00
parent 35cfaafda8
commit 9d546bf05a
13 changed files with 76 additions and 84 deletions

View File

@@ -215,6 +215,7 @@ OSStatus AudioDriverCoreAudio::input_callback(void *inRefCon,
}
ad->lock();
ad->start_counting_ticks();
AudioBufferList bufferList;
bufferList.mNumberBuffers = 1;
@@ -237,6 +238,7 @@ OSStatus AudioDriverCoreAudio::input_callback(void *inRefCon,
ERR_PRINT("AudioUnitRender failed, code: " + itos(result));
}
ad->stop_counting_ticks();
ad->unlock();
return result;