comparison data/fileio/AudioFileReaderFactory.h @ 1040:a1cd5abcb38b cxx11

Introduce and use a samplerate type
author Chris Cannam
date Wed, 04 Mar 2015 12:01:04 +0000
parents d03b3d956358
children 329ddaf7415d
comparison
equal deleted inserted replaced
1039:b14064bd1f97 1040:a1cd5abcb38b
17 #define _AUDIO_FILE_READER_FACTORY_H_ 17 #define _AUDIO_FILE_READER_FACTORY_H_
18 18
19 #include <QString> 19 #include <QString>
20 20
21 #include "FileSource.h" 21 #include "FileSource.h"
22 #include "base/BaseTypes.h"
22 23
23 class AudioFileReader; 24 class AudioFileReader;
24 class ProgressReporter; 25 class ProgressReporter;
25 26
26 class AudioFileReaderFactory 27 class AudioFileReaderFactory
51 * object. 52 * object.
52 * 53 *
53 * Caller owns the returned object and must delete it after use. 54 * Caller owns the returned object and must delete it after use.
54 */ 55 */
55 static AudioFileReader *createReader(FileSource source, 56 static AudioFileReader *createReader(FileSource source,
56 int targetRate = 0, 57 sv_samplerate_t targetRate = 0,
57 bool normalised = false, 58 bool normalised = false,
58 ProgressReporter *reporter = 0); 59 ProgressReporter *reporter = 0);
59 60
60 /** 61 /**
61 * Return an audio file reader initialised to the file at the 62 * Return an audio file reader initialised to the file at the
80 * ownership of the reporter object. 81 * ownership of the reporter object.
81 * 82 *
82 * Caller owns the returned object and must delete it after use. 83 * Caller owns the returned object and must delete it after use.
83 */ 84 */
84 static AudioFileReader *createThreadingReader(FileSource source, 85 static AudioFileReader *createThreadingReader(FileSource source,
85 int targetRate = 0, 86 sv_samplerate_t targetRate = 0,
86 bool normalised = false, 87 bool normalised = false,
87 ProgressReporter *reporter = 0); 88 ProgressReporter *reporter = 0);
88 89
89 protected: 90 protected:
90 static AudioFileReader *create(FileSource source, 91 static AudioFileReader *create(FileSource source,
91 int targetRate, 92 sv_samplerate_t targetRate,
92 bool normalised, 93 bool normalised,
93 bool threading, 94 bool threading,
94 ProgressReporter *reporter); 95 ProgressReporter *reporter);
95 }; 96 };
96 97