Mercurial > hg > svcore
comparison data/fileio/AudioFileReaderFactory.cpp @ 157:c03ec31005e1
* Add zoom thumbwheels to Pane. Implement horizontal thumbwheel, and
vertical depending on layer type (supported for waveform and spectrogram,
though wrong for log-scale spectrogram at the moment).
* Add bare bones of a spectrum layer.
* Add window icon
* Add shortcut for "insert time instant" on laptops without keypad enter (";")
* Delete FFT processing thread when it exits (at least, next time we're asked
for something interesting)
* Get audio file extensions from the file readers, and thus from libsndfile for
the wave file reader -- leads to rather a wide combo box in file dialog though
* Better refresh order for spectrogram (redraw centre section first)
author | Chris Cannam |
---|---|
date | Fri, 04 Aug 2006 17:01:37 +0000 |
parents | 1a42221a1522 |
children | 91fdc752e540 |
comparison
equal
deleted
inserted
replaced
156:059b0322009c | 157:c03ec31005e1 |
---|---|
22 #include <QString> | 22 #include <QString> |
23 | 23 |
24 QString | 24 QString |
25 AudioFileReaderFactory::getKnownExtensions() | 25 AudioFileReaderFactory::getKnownExtensions() |
26 { | 26 { |
27 return | 27 std::set<QString> extensions; |
28 "*.wav *.aiff *.aif" | 28 |
29 WavFileReader::getSupportedExtensions(extensions); | |
29 #ifdef HAVE_MAD | 30 #ifdef HAVE_MAD |
30 " *.mp3" | 31 MP3FileReader::getSupportedExtensions(extensions); |
31 #endif | 32 #endif |
32 #ifdef HAVE_OGGZ | 33 #ifdef HAVE_OGGZ |
33 #ifdef HAVE_FISHSOUND | 34 #ifdef HAVE_FISHSOUND |
34 " *.ogg" | 35 OggVorbisFileReader::getSupportedExtensions(extensions); |
35 #endif | 36 #endif |
36 #endif | 37 #endif |
37 ; | 38 |
39 QString rv; | |
40 for (std::set<QString>::const_iterator i = extensions.begin(); | |
41 i != extensions.end(); ++i) { | |
42 if (i != extensions.begin()) rv += " "; | |
43 rv += "*." + *i; | |
44 } | |
45 | |
46 return rv; | |
38 } | 47 } |
39 | 48 |
40 AudioFileReader * | 49 AudioFileReader * |
41 AudioFileReaderFactory::createReader(QString path) | 50 AudioFileReaderFactory::createReader(QString path) |
42 { | 51 { |