Mercurial > hg > svcore
comparison data/fileio/AudioFileReaderFactory.h @ 327:1d656dcda8ef
* some tweaks to improve usability of these classes in a console application
author | Chris Cannam |
---|---|
date | Fri, 02 Nov 2007 16:50:31 +0000 |
parents | c324d410b096 |
children | 183ee2a55fc7 |
comparison
equal
deleted
inserted
replaced
326:bb6e4c46e202 | 327:1d656dcda8ef |
---|---|
42 * if you want to find out whether the file is being resampled | 42 * if you want to find out whether the file is being resampled |
43 * or not. | 43 * or not. |
44 * | 44 * |
45 * Caller owns the returned object and must delete it after use. | 45 * Caller owns the returned object and must delete it after use. |
46 */ | 46 */ |
47 static AudioFileReader *createReader(FileSource source, size_t targetRate = 0); | 47 static AudioFileReader *createReader(FileSource source, |
48 size_t targetRate = 0); | |
49 | |
50 /** | |
51 * Return an audio file reader initialised to the file at the | |
52 * given path, or NULL if no suitable reader for this path is | |
53 * available or the file cannot be opened. If the reader supports | |
54 * threaded decoding, it will be used and the file decoded in a | |
55 * background thread. | |
56 * | |
57 * If targetRate is non-zero, the file will be resampled to that | |
58 * rate (transparently). You can query reader->getNativeRate() | |
59 * if you want to find out whether the file is being resampled | |
60 * or not. | |
61 * | |
62 * Caller owns the returned object and must delete it after use. | |
63 */ | |
64 static AudioFileReader *createThreadingReader(FileSource source, | |
65 size_t targetRate = 0); | |
66 | |
67 protected: | |
68 static AudioFileReader *create(FileSource source, | |
69 size_t targetRate, | |
70 bool threading); | |
48 }; | 71 }; |
49 | 72 |
50 #endif | 73 #endif |
51 | 74 |