comparison data/fileio/AudioFileReaderFactory.h @ 933:d03b3d956358 warnfix_no_size_t

Merge from branch tony_integration
author Chris Cannam
date Wed, 18 Jun 2014 08:34:46 +0100
parents 59e7fe1b1003 f3cda3280398
children a1cd5abcb38b
comparison
equal deleted inserted replaced
932:e06f03013f46 933:d03b3d956358
41 * If targetRate is non-zero, the file will be resampled to that 41 * If targetRate is non-zero, the file will be resampled to that
42 * rate (transparently). You can query reader->getNativeRate() 42 * rate (transparently). You can query reader->getNativeRate()
43 * if you want to find out whether the file is being resampled 43 * if you want to find out whether the file is being resampled
44 * or not. 44 * or not.
45 * 45 *
46 * If normalised is true, the file data will be normalised to
47 * abs(max) == 1.0. Otherwise the file will not be normalised.
48 *
46 * If a ProgressReporter is provided, it will be updated with 49 * If a ProgressReporter is provided, it will be updated with
47 * progress status. Caller retains ownership of the reporter 50 * progress status. Caller retains ownership of the reporter
48 * object. 51 * object.
49 * 52 *
50 * Caller owns the returned object and must delete it after use. 53 * Caller owns the returned object and must delete it after use.
51 */ 54 */
52 static AudioFileReader *createReader(FileSource source, 55 static AudioFileReader *createReader(FileSource source,
53 int targetRate = 0, 56 int targetRate = 0,
57 bool normalised = false,
54 ProgressReporter *reporter = 0); 58 ProgressReporter *reporter = 0);
55 59
56 /** 60 /**
57 * Return an audio file reader initialised to the file at the 61 * Return an audio file reader initialised to the file at the
58 * given path, or NULL if no suitable reader for this path is 62 * given path, or NULL if no suitable reader for this path is
63 * If targetRate is non-zero, the file will be resampled to that 67 * If targetRate is non-zero, the file will be resampled to that
64 * rate (transparently). You can query reader->getNativeRate() 68 * rate (transparently). You can query reader->getNativeRate()
65 * if you want to find out whether the file is being resampled 69 * if you want to find out whether the file is being resampled
66 * or not. 70 * or not.
67 * 71 *
72 * If normalised is true, the file data will be normalised to
73 * abs(max) == 1.0. Otherwise the file will not be normalised.
74 *
68 * If a ProgressReporter is provided, it will be updated with 75 * If a ProgressReporter is provided, it will be updated with
69 * progress status. This will only be meaningful if threading 76 * progress status. This will only be meaningful if threading
70 * mode is not used because the file reader in use does not 77 * mode is not used because the file reader in use does not
71 * support it; otherwise progress as reported will jump straight 78 * support it; otherwise progress as reported will jump straight
72 * to 100% before threading mode takes over. Caller retains 79 * to 100% before threading mode takes over. Caller retains
74 * 81 *
75 * Caller owns the returned object and must delete it after use. 82 * Caller owns the returned object and must delete it after use.
76 */ 83 */
77 static AudioFileReader *createThreadingReader(FileSource source, 84 static AudioFileReader *createThreadingReader(FileSource source,
78 int targetRate = 0, 85 int targetRate = 0,
86 bool normalised = false,
79 ProgressReporter *reporter = 0); 87 ProgressReporter *reporter = 0);
80 88
81 protected: 89 protected:
82 static AudioFileReader *create(FileSource source, 90 static AudioFileReader *create(FileSource source,
83 int targetRate, 91 int targetRate,
92 bool normalised,
84 bool threading, 93 bool threading,
85 ProgressReporter *reporter); 94 ProgressReporter *reporter);
86 }; 95 };
87 96
88 #endif 97 #endif