Mercurial > hg > svcore
comparison data/fileio/WavFileReader.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 | b0f4555b625e |
comparison
equal
deleted
inserted
replaced
156:059b0322009c | 157:c03ec31005e1 |
---|---|
108 | 108 |
109 m_mutex.unlock(); | 109 m_mutex.unlock(); |
110 return; | 110 return; |
111 } | 111 } |
112 | 112 |
113 void | |
114 WavFileReader::getSupportedExtensions(std::set<QString> &extensions) | |
115 { | |
116 int count; | |
117 | |
118 if (sf_command(0, SFC_GET_FORMAT_MAJOR_COUNT, &count, sizeof(count))) { | |
119 extensions.insert("wav"); | |
120 extensions.insert("aiff"); | |
121 extensions.insert("aif"); | |
122 return; | |
123 } | |
124 | |
125 SF_FORMAT_INFO info; | |
126 for (int i = 0; i < count; ++i) { | |
127 info.format = i; | |
128 if (!sf_command(0, SFC_GET_FORMAT_MAJOR, &info, sizeof(info))) { | |
129 extensions.insert(info.extension); | |
130 } | |
131 } | |
132 } |