comparison data/fileio/test/EncodingTest.h @ 1360:8eddb528ef0c 3.0-integration

Some platforms don't use native Ogg/Vorbis libraries
author Chris Cannam <cannam@all-day-breakfast.com>
date Tue, 10 Jan 2017 11:06:19 +0000
parents 1c9bbbb6116a
children aadfb395e933
comparison
equal deleted inserted replaced
1359:1c9bbbb6116a 1360:8eddb528ef0c
132 QString file = fileAndExt[0]; 132 QString file = fileAndExt[0];
133 QString extension = fileAndExt[1]; 133 QString extension = fileAndExt[1];
134 134
135 if (extension != "wav") { 135 if (extension != "wav") {
136 136
137 #if (!defined (HAVE_OGGZ) || !defined(HAVE_FISHSOUND))
138 if (extension == "ogg") {
139 QSKIP("Lack native Ogg Vorbis reader, so won't be getting metadata");
140 }
141 #endif
142
137 auto blah = reader->getInterleavedFrames(0, 10); 143 auto blah = reader->getInterleavedFrames(0, 10);
138 144
139 QString title = reader->getTitle(); 145 QString title = reader->getTitle();
140 QVERIFY(title != QString()); 146 QVERIFY(title != QString());
141 147
197 203
198 if (extension == "wav") { 204 if (extension == "wav") {
199 return; 205 return;
200 } 206 }
201 207
208 #if (!defined (HAVE_OGGZ) || !defined(HAVE_FISHSOUND))
209 if (extension == "ogg") {
210 QSKIP("Lack native Ogg Vorbis reader, so won't be getting metadata");
211 }
212 #endif
213
202 AudioFileReaderFactory::Parameters params; 214 AudioFileReaderFactory::Parameters params;
203 AudioFileReader *reader = 215 AudioFileReader *reader =
204 AudioFileReaderFactory::createReader 216 AudioFileReaderFactory::createReader
205 (encodingDir + "/" + audiofile, params); 217 (encodingDir + "/" + audiofile, params);
206 QVERIFY(reader != nullptr); 218 QVERIFY(reader != nullptr);