Mercurial > hg > svcore
diff data/fileio/MP3FileReader.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 | e802e550a1f2 |
children | d03b3d956358 |
line wrap: on
line diff
--- a/data/fileio/MP3FileReader.cpp Tue Jun 17 13:52:07 2014 +0100 +++ b/data/fileio/MP3FileReader.cpp Tue Jun 17 14:33:42 2014 +0100 @@ -37,7 +37,7 @@ #include <QFileInfo> MP3FileReader::MP3FileReader(FileSource source, DecodeMode decodeMode, - CacheMode mode, size_t targetRate, + CacheMode mode, int targetRate, ProgressReporter *reporter) : CodedAudioFileReader(mode, targetRate), m_source(source), @@ -85,7 +85,7 @@ } ssize_t sz = 0; - size_t offset = 0; + int offset = 0; while (offset < m_fileSize) { sz = ::read(fd, m_filebuffer + offset, m_fileSize - offset); if (sz < 0) { @@ -274,7 +274,7 @@ m_reader->m_filebuffer = 0; if (m_reader->m_samplebuffer) { - for (size_t c = 0; c < m_reader->m_channelCount; ++c) { + for (int c = 0; c < m_reader->m_channelCount; ++c) { delete[] m_reader->m_samplebuffer[c]; } delete[] m_reader->m_samplebuffer; @@ -290,7 +290,7 @@ } bool -MP3FileReader::decode(void *mm, size_t sz) +MP3FileReader::decode(void *mm, int sz) { DecoderData data; struct mad_decoder decoder; @@ -391,7 +391,7 @@ initialiseDecodeCache(); } - if (m_samplebuffersize < frames) { + if (int(m_samplebuffersize) < frames) { if (!m_samplebuffer) { m_samplebuffer = new float *[channels]; for (int c = 0; c < channels; ++c) { @@ -427,11 +427,11 @@ } enum mad_flow -MP3FileReader::error(void *dp, - struct mad_stream *stream, +MP3FileReader::error(void * /* dp */, + struct mad_stream * /* stream */, struct mad_frame *) { - DecoderData *data = (DecoderData *)dp; +// DecoderData *data = (DecoderData *)dp; // fprintf(stderr, "decoding error 0x%04x (%s) at byte offset %lu\n", // stream->error, mad_stream_errorstr(stream),