Mercurial > hg > svcore
comparison data/fileio/CodedAudioFileReader.h @ 1858:14747f24ad04
Use cancellable serialiser; add some more profiling points
author | Chris Cannam |
---|---|
date | Thu, 14 May 2020 16:36:48 +0100 |
parents | c01cbe41aeb5 |
children |
comparison
equal
deleted
inserted
replaced
1857:14c776dad920 | 1858:14747f24ad04 |
---|---|
25 #include <windows.h> | 25 #include <windows.h> |
26 #define ENABLE_SNDFILE_WINDOWS_PROTOTYPES 1 | 26 #define ENABLE_SNDFILE_WINDOWS_PROTOTYPES 1 |
27 #endif | 27 #endif |
28 | 28 |
29 #include <sndfile.h> | 29 #include <sndfile.h> |
30 | |
31 #include <atomic> | |
30 | 32 |
31 class WavFileReader; | 33 class WavFileReader; |
32 class Serialiser; | 34 class Serialiser; |
33 | 35 |
34 namespace breakfastquay { | 36 namespace breakfastquay { |
82 // may throw InsufficientDiscSpace: | 84 // may throw InsufficientDiscSpace: |
83 void finishDecodeCache(); | 85 void finishDecodeCache(); |
84 | 86 |
85 bool isDecodeCacheInitialised() const { return m_initialised; } | 87 bool isDecodeCacheInitialised() const { return m_initialised; } |
86 | 88 |
87 void startSerialised(QString id); | 89 void startSerialised(QString id, const std::atomic<bool> *cancelled); |
88 void endSerialised(); | 90 void endSerialised(); |
89 | 91 |
90 private: | 92 private: |
91 void pushCacheWriteBufferMaybe(bool final); | 93 void pushCacheWriteBufferMaybe(bool final); |
92 | 94 |