comparison data/fileio/CodedAudioFileReader.h @ 263:71dfc6ab3b54

* Threaded mp3/ogg file reading. Not activated yet, as it doesn't work in context (SV needs to know the duration of its main model at the outset)
author Chris Cannam
date Thu, 24 May 2007 16:20:22 +0000
parents 1a42221a1522
children 20028c634494
comparison
equal deleted inserted replaced
262:524bcd89743b 263:71dfc6ab3b54
17 #define _CODED_AUDIO_FILE_READER_H_ 17 #define _CODED_AUDIO_FILE_READER_H_
18 18
19 #include "AudioFileReader.h" 19 #include "AudioFileReader.h"
20 20
21 #include <sndfile.h> 21 #include <sndfile.h>
22 #include <QMutex>
22 23
23 class WavFileReader; 24 class WavFileReader;
24 25
25 class CodedAudioFileReader : public AudioFileReader 26 class CodedAudioFileReader : public AudioFileReader
26 { 27 {
41 void initialiseDecodeCache(); // samplerate, channels must have been set 42 void initialiseDecodeCache(); // samplerate, channels must have been set
42 void addSampleToDecodeCache(float sample); 43 void addSampleToDecodeCache(float sample);
43 void finishDecodeCache(); 44 void finishDecodeCache();
44 bool isDecodeCacheInitialised() const { return m_initialised; } 45 bool isDecodeCacheInitialised() const { return m_initialised; }
45 46
47 QMutex m_cacheMutex;
46 CacheMode m_cacheMode; 48 CacheMode m_cacheMode;
47 SampleBlock m_data; 49 SampleBlock m_data;
48 bool m_initialised; 50 bool m_initialised;
49 51
50 QString m_cacheFileName; 52 QString m_cacheFileName;