comparison data/fileio/AudioFileReaderFactory.cpp @ 929:59e7fe1b1003 warnfix_no_size_t

Unsigned removals and warning fixes in data/
author Chris Cannam
date Tue, 17 Jun 2014 14:33:42 +0100
parents f5cd33909744
children d03b3d956358
comparison
equal deleted inserted replaced
928:6a94bb528e9d 929:59e7fe1b1003
56 56
57 return rv; 57 return rv;
58 } 58 }
59 59
60 AudioFileReader * 60 AudioFileReader *
61 AudioFileReaderFactory::createReader(FileSource source, size_t targetRate, 61 AudioFileReaderFactory::createReader(FileSource source, int targetRate,
62 ProgressReporter *reporter) 62 ProgressReporter *reporter)
63 { 63 {
64 return create(source, targetRate, false, reporter); 64 return create(source, targetRate, false, reporter);
65 } 65 }
66 66
67 AudioFileReader * 67 AudioFileReader *
68 AudioFileReaderFactory::createThreadingReader(FileSource source, size_t targetRate, 68 AudioFileReaderFactory::createThreadingReader(FileSource source, int targetRate,
69 ProgressReporter *reporter) 69 ProgressReporter *reporter)
70 { 70 {
71 return create(source, targetRate, true, reporter); 71 return create(source, targetRate, true, reporter);
72 } 72 }
73 73
74 AudioFileReader * 74 AudioFileReader *
75 AudioFileReaderFactory::create(FileSource source, size_t targetRate, bool threading, 75 AudioFileReaderFactory::create(FileSource source, int targetRate, bool threading,
76 ProgressReporter *reporter) 76 ProgressReporter *reporter)
77 { 77 {
78 QString err; 78 QString err;
79 79
80 SVDEBUG << "AudioFileReaderFactory::createReader(\"" << source.getLocation() << "\"): Requested rate: " << targetRate << endl; 80 SVDEBUG << "AudioFileReaderFactory::createReader(\"" << source.getLocation() << "\"): Requested rate: " << targetRate << endl;
100 100
101 int fileRate = reader->getSampleRate(); 101 int fileRate = reader->getSampleRate();
102 102
103 if (reader->isOK() && 103 if (reader->isOK() &&
104 (!reader->isQuicklySeekable() || 104 (!reader->isQuicklySeekable() ||
105 (targetRate != 0 && fileRate != targetRate))) { 105 (targetRate != 0 && fileRate != (int)targetRate))) {
106 106
107 SVDEBUG << "AudioFileReaderFactory::createReader: WAV file rate: " << reader->getSampleRate() << ", seekable " << reader->isQuicklySeekable() << ", creating decoding reader" << endl; 107 SVDEBUG << "AudioFileReaderFactory::createReader: WAV file rate: " << reader->getSampleRate() << ", seekable " << reader->isQuicklySeekable() << ", creating decoding reader" << endl;
108 108
109 delete reader; 109 delete reader;
110 reader = new DecodingWavFileReader 110 reader = new DecodingWavFileReader
213 213
214 int fileRate = reader->getSampleRate(); 214 int fileRate = reader->getSampleRate();
215 215
216 if (reader->isOK() && 216 if (reader->isOK() &&
217 (!reader->isQuicklySeekable() || 217 (!reader->isQuicklySeekable() ||
218 (targetRate != 0 && fileRate != targetRate))) { 218 (targetRate != 0 && fileRate != (int)targetRate))) {
219 219
220 SVDEBUG << "AudioFileReaderFactory::createReader: WAV file rate: " << reader->getSampleRate() << ", seekable " << reader->isQuicklySeekable() << ", creating decoding reader" << endl; 220 SVDEBUG << "AudioFileReaderFactory::createReader: WAV file rate: " << reader->getSampleRate() << ", seekable " << reader->isQuicklySeekable() << ", creating decoding reader" << endl;
221 221
222 delete reader; 222 delete reader;
223 reader = new DecodingWavFileReader 223 reader = new DecodingWavFileReader