///////////////////////////////////////////////////////////////////////////////
// LameXP - Audio Encoder Front-End
-// Copyright (C) 2004-2015 LoRd_MuldeR <MuldeR2@GMX.de>
+// Copyright (C) 2004-2016 LoRd_MuldeR <MuldeR2@GMX.de>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
return okay;
}
+bool WaveDecoder::progressHandler(const double &progress, void *const data)
+{
+ if(data)
+ {
+ //qWarning("Copy progress: %.2f", progress);
+ reinterpret_cast<ProgressData*>(data)->instance->updateProgress(progress);
+ return (!(*reinterpret_cast<ProgressData*>(data)->abrtFlag));
+ }
+ return true;
+}
+
+void WaveDecoder::updateProgress(const double &progress)
+{
+ emit statusUpdated(qBound(0, qRound(progress * 100.0), 100));
+}
+
bool WaveDecoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion)
{
if(containerType.compare("Wave", Qt::CaseInsensitive) == 0)
return false;
}
-QStringList WaveDecoder::supportedTypes(void)
+const AbstractDecoder::supportedType_t *WaveDecoder::supportedTypes(void)
{
- return QStringList() << "Waveform Audio File (*.wav)";
-}
+ static const char *exts[] =
+ {
+ "wav", NULL
+ };
-bool WaveDecoder::progressHandler(const double &progress, void *const data)
-{
- if(data)
+ static const supportedType_t s_supportedTypes[] =
{
- //qWarning("Copy progress: %.2f", progress);
- reinterpret_cast<ProgressData*>(data)->instance->updateProgress(progress);
- return (!(*reinterpret_cast<ProgressData*>(data)->abrtFlag));
- }
- return true;
-}
+ { "Waveform Audio File", exts },
+ { NULL, NULL }
+ };
-void WaveDecoder::updateProgress(const double &progress)
-{
- emit statusUpdated(qBound(0, qRound(progress * 100.0), 100));
+ return s_supportedTypes;
}