aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Input/sndfile
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2019-01-03 07:41:04 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2019-01-03 07:41:04 +0000
commitb917024aa1ac4cb0a40164132db3c6d2913157eb (patch)
tree4424bef9f2ac9a3dab21c822836a1b5c79ffee47 /src/plugins/Input/sndfile
parentbef5a901922c002815d047d276e61ec0bf8c0f46 (diff)
downloadqmmp-b917024aa1ac4cb0a40164132db3c6d2913157eb.tar.gz
qmmp-b917024aa1ac4cb0a40164132db3c6d2913157eb.tar.bz2
qmmp-b917024aa1ac4cb0a40164132db3c6d2913157eb.zip
fixed build with -Werror=zero-as-null-pointer-constant
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@8572 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Input/sndfile')
-rw-r--r--src/plugins/Input/sndfile/decoder_sndfile.cpp6
-rw-r--r--src/plugins/Input/sndfile/decodersndfilefactory.cpp8
2 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/Input/sndfile/decoder_sndfile.cpp b/src/plugins/Input/sndfile/decoder_sndfile.cpp
index d90859454..45607cb24 100644
--- a/src/plugins/Input/sndfile/decoder_sndfile.cpp
+++ b/src/plugins/Input/sndfile/decoder_sndfile.cpp
@@ -79,7 +79,7 @@ DecoderSndFile::DecoderSndFile(QIODevice *input) : Decoder(input)
//m_path = input;
m_bitrate = 0;
m_totalTime = 0;
- m_sndfile = 0;
+ m_sndfile = nullptr;
m_freq = 0;
}
@@ -118,7 +118,7 @@ bool DecoderSndFile::initialize()
m_bitrate = input()->size () * 8.0 / m_totalTime + 0.5;
if((snd_info.format & SF_FORMAT_SUBMASK) == SF_FORMAT_FLOAT)
- sf_command (m_sndfile, SFC_SET_SCALE_FLOAT_INT_READ, NULL, SF_TRUE);
+ sf_command (m_sndfile, SFC_SET_SCALE_FLOAT_INT_READ, nullptr, SF_TRUE);
configure(m_freq, chan, Qmmp::PCM_S16LE);
qDebug("DecoderSndFile: detected format: %08X", snd_info.format);
@@ -133,7 +133,7 @@ void DecoderSndFile::deinit()
m_freq = 0;
if (m_sndfile)
sf_close(m_sndfile);
- m_sndfile = 0;
+ m_sndfile = nullptr;
}
qint64 DecoderSndFile::totalTime() const
diff --git a/src/plugins/Input/sndfile/decodersndfilefactory.cpp b/src/plugins/Input/sndfile/decodersndfilefactory.cpp
index f786e091a..23084bb63 100644
--- a/src/plugins/Input/sndfile/decodersndfilefactory.cpp
+++ b/src/plugins/Input/sndfile/decodersndfilefactory.cpp
@@ -141,7 +141,7 @@ QList<TrackInfo *> DecoderSndFileFactory::createPlayList(const QString &path, Tr
return QList<TrackInfo*>() << info;
SF_INFO snd_info;
- SNDFILE *sndfile = 0;
+ SNDFILE *sndfile = nullptr;
memset(&snd_info, 0, sizeof(snd_info));
snd_info.format = 0;
#ifdef Q_OS_WIN
@@ -201,7 +201,7 @@ QList<TrackInfo *> DecoderSndFileFactory::createPlayList(const QString &path, Tr
SF_FORMAT_INFO format_info;
memset(&format_info, 0, sizeof(format_info));
format_info.format = (snd_info.format & SF_FORMAT_TYPEMASK);
- sf_command(0, SFC_GET_FORMAT_INFO, &format_info, sizeof(format_info));
+ sf_command(nullptr, SFC_GET_FORMAT_INFO, &format_info, sizeof(format_info));
info->setValue(Qmmp::FORMAT_NAME, QString::fromLatin1(format_info.name));
info->setDuration(int(snd_info.frames * 1000 / snd_info.samplerate));
}
@@ -212,7 +212,7 @@ QList<TrackInfo *> DecoderSndFileFactory::createPlayList(const QString &path, Tr
MetaDataModel* DecoderSndFileFactory::createMetaDataModel(const QString&, bool)
{
- return 0;
+ return nullptr;
}
void DecoderSndFileFactory::showSettings(QWidget *)
@@ -221,7 +221,7 @@ void DecoderSndFileFactory::showSettings(QWidget *)
void DecoderSndFileFactory::showAbout(QWidget *parent)
{
char version [128] = { 0 };
- sf_command (NULL, SFC_GET_LIB_VERSION, version, sizeof (version)) ;
+ sf_command (nullptr, SFC_GET_LIB_VERSION, version, sizeof (version)) ;
QMessageBox::about (parent, tr("About Sndfile Audio Plugin"),
tr("Qmmp Sndfile Audio Plugin")+"\n"+
tr("Compiled against")+" "+QString(version)+"\n" +