1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-08 08:01:19 +02:00

Make a one-time dynamic check that atomic<double> doesn't use mutexes

This commit is contained in:
Paul Licameli 2018-08-10 20:19:11 -04:00
parent 3f1d9ab8c1
commit 6126f2f626

View File

@ -1179,6 +1179,14 @@ bool AudioIO::ValidateDeviceNames(const wxString &play, const wxString &rec)
AudioIO::AudioIO()
{
if (!std::atomic<double>{}.is_lock_free()) {
// If this check fails, then the atomic<double> members in AudioIO.h
// might be changed to atomic<float> to be more efficient with some
// loss of precision. That could be conditionally compiled depending
// on the platform.
wxASSERT(false);
}
mAudioThreadShouldCallFillBuffersOnce = false;
mAudioThreadFillBuffersLoopRunning = false;
mAudioThreadFillBuffersLoopActive = false;