diff data/model/ReadOnlyWaveFileModel.h @ 1858:14747f24ad04

Use cancellable serialiser; add some more profiling points
author Chris Cannam
date Thu, 14 May 2020 16:36:48 +0100
parents 78fe29adfd16
children
line wrap: on
line diff
--- a/data/model/ReadOnlyWaveFileModel.h	Thu May 14 16:35:39 2020 +0100
+++ b/data/model/ReadOnlyWaveFileModel.h	Thu May 14 16:36:48 2020 +0100
@@ -29,6 +29,8 @@
 
 #include <stdlib.h>
 
+#include <atomic>
+
 class AudioFileReader;
 
 class ReadOnlyWaveFileModel : public WaveFileModel
@@ -137,7 +139,7 @@
     QTimer *m_updateTimer;
     sv_frame_t m_lastFillExtent;
     mutable int m_prevCompletion;
-    bool m_exiting;
+    std::atomic<bool> m_exiting;
     static PowerOfSqrtTwoZoomConstraint m_zoomConstraint;
 
     mutable floatvec_t m_directRead;