Mercurial > hg > svcore
comparison data/fileio/CodedAudioFileReader.h @ 543:7a66b94ef1c0
* Thread safety (fixing a crash)
author | Chris Cannam |
---|---|
date | Wed, 04 Feb 2009 10:53:38 +0000 |
parents | b92513201610 |
children | 65d955c4d671 |
comparison
equal
deleted
inserted
replaced
542:1ddab154fb9a | 543:7a66b94ef1c0 |
---|---|
18 | 18 |
19 #include "AudioFileReader.h" | 19 #include "AudioFileReader.h" |
20 | 20 |
21 #include <sndfile.h> | 21 #include <sndfile.h> |
22 #include <QMutex> | 22 #include <QMutex> |
23 #include <QReadWriteLock> | |
23 | 24 |
24 class WavFileReader; | 25 class WavFileReader; |
25 class Serialiser; | 26 class Serialiser; |
26 class Resampler; | 27 class Resampler; |
27 | 28 |
63 | 64 |
64 protected: | 65 protected: |
65 QMutex m_cacheMutex; | 66 QMutex m_cacheMutex; |
66 CacheMode m_cacheMode; | 67 CacheMode m_cacheMode; |
67 SampleBlock m_data; | 68 SampleBlock m_data; |
69 mutable QReadWriteLock m_dataLock; | |
68 bool m_initialised; | 70 bool m_initialised; |
69 Serialiser *m_serialiser; | 71 Serialiser *m_serialiser; |
70 size_t m_fileRate; | 72 size_t m_fileRate; |
71 | 73 |
72 QString m_cacheFileName; | 74 QString m_cacheFileName; |