summaryrefslogtreecommitdiff
path: root/drivers/coreaudio
diff options
context:
space:
mode:
authorPedro J. Estébanez <pedrojrulez@gmail.com>2022-08-19 10:38:13 +0200
committerPedro J. Estébanez <pedrojrulez@gmail.com>2022-08-19 13:28:10 +0200
commit9d546bf05a31e46f21077de3718d369ee7660b59 (patch)
tree18812927bdaed881e904ffd8c3a02af294f7e1f6 /drivers/coreaudio
parent35cfaafda8073f700c9d2fe42a43d3d81eaaea67 (diff)
Make audio thread control flags safe
Diffstat (limited to 'drivers/coreaudio')
-rw-r--r--drivers/coreaudio/audio_driver_coreaudio.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/coreaudio/audio_driver_coreaudio.cpp b/drivers/coreaudio/audio_driver_coreaudio.cpp
index cc38c2352f..6e76760edf 100644
--- a/drivers/coreaudio/audio_driver_coreaudio.cpp
+++ b/drivers/coreaudio/audio_driver_coreaudio.cpp
@@ -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;