Mercurial > hg > svcore
comparison data/fileio/DecodingWavFileReader.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 | f0558e69a074 |
children | d03b3d956358 |
comparison
equal
deleted
inserted
replaced
928:6a94bb528e9d | 929:59e7fe1b1003 |
---|---|
22 #include <QFileInfo> | 22 #include <QFileInfo> |
23 | 23 |
24 DecodingWavFileReader::DecodingWavFileReader(FileSource source, | 24 DecodingWavFileReader::DecodingWavFileReader(FileSource source, |
25 ResampleMode resampleMode, | 25 ResampleMode resampleMode, |
26 CacheMode mode, | 26 CacheMode mode, |
27 size_t targetRate, | 27 int targetRate, |
28 ProgressReporter *reporter) : | 28 ProgressReporter *reporter) : |
29 CodedAudioFileReader(mode, targetRate), | 29 CodedAudioFileReader(mode, targetRate), |
30 m_source(source), | 30 m_source(source), |
31 m_path(source.getLocalFilename()), | 31 m_path(source.getLocalFilename()), |
32 m_cancelled(false), | 32 m_cancelled(false), |
61 connect(m_reporter, SIGNAL(cancelled()), this, SLOT(cancelled())); | 61 connect(m_reporter, SIGNAL(cancelled()), this, SLOT(cancelled())); |
62 m_reporter->setMessage | 62 m_reporter->setMessage |
63 (tr("Decoding %1...").arg(QFileInfo(m_path).fileName())); | 63 (tr("Decoding %1...").arg(QFileInfo(m_path).fileName())); |
64 } | 64 } |
65 | 65 |
66 size_t blockSize = 16384; | 66 int blockSize = 16384; |
67 size_t total = m_original->getFrameCount(); | 67 int total = m_original->getFrameCount(); |
68 | 68 |
69 SampleBlock block; | 69 SampleBlock block; |
70 | 70 |
71 for (size_t i = 0; i < total; i += blockSize) { | 71 for (int i = 0; i < total; i += blockSize) { |
72 | 72 |
73 size_t count = blockSize; | 73 int count = blockSize; |
74 if (i + count > total) count = total - i; | 74 if (i + count > total) count = total - i; |
75 | 75 |
76 m_original->getInterleavedFrames(i, count, block); | 76 m_original->getInterleavedFrames(i, count, block); |
77 addBlock(block); | 77 addBlock(block); |
78 | 78 |
118 { | 118 { |
119 if (m_reader->m_cacheMode == CacheInTemporaryFile) { | 119 if (m_reader->m_cacheMode == CacheInTemporaryFile) { |
120 m_reader->startSerialised("DecodingWavFileReader::Decode"); | 120 m_reader->startSerialised("DecodingWavFileReader::Decode"); |
121 } | 121 } |
122 | 122 |
123 size_t blockSize = 16384; | 123 int blockSize = 16384; |
124 size_t total = m_reader->m_original->getFrameCount(); | 124 int total = m_reader->m_original->getFrameCount(); |
125 | 125 |
126 SampleBlock block; | 126 SampleBlock block; |
127 | 127 |
128 for (size_t i = 0; i < total; i += blockSize) { | 128 for (int i = 0; i < total; i += blockSize) { |
129 | 129 |
130 size_t count = blockSize; | 130 int count = blockSize; |
131 if (i + count > total) count = total - i; | 131 if (i + count > total) count = total - i; |
132 | 132 |
133 m_reader->m_original->getInterleavedFrames(i, count, block); | 133 m_reader->m_original->getInterleavedFrames(i, count, block); |
134 m_reader->addBlock(block); | 134 m_reader->addBlock(block); |
135 | 135 |