removed reliance on Qt multimedia

This commit is contained in:
itsmattkc
2021-10-01 16:12:12 -07:00
parent 12a0c3a977
commit fbc5997d32
13 changed files with 111 additions and 95 deletions
-20
View File
@@ -67,26 +67,6 @@ bool AudioParams::operator!=(const AudioParams &other) const
return !(*this == other);
}
QAudioFormat::SampleType AudioParams::GetQtSampleType(AudioParams::Format format)
{
switch (format) {
case kFormatUnsigned8:
return QAudioFormat::UnSignedInt;
case kFormatSigned16:
case kFormatSigned32:
case kFormatSigned64:
return QAudioFormat::SignedInt;
case kFormatFloat32:
case kFormatFloat64:
return QAudioFormat::Float;
case kFormatInvalid:
case kFormatCount:
break;
}
return QAudioFormat::Unknown;
}
qint64 AudioParams::time_to_bytes(const double &time) const
{
return time_to_bytes_per_channel(time) * channel_count();
-3
View File
@@ -21,7 +21,6 @@
#ifndef AUDIOPARAMS_H
#define AUDIOPARAMS_H
#include <QAudioFormat>
#include <QtMath>
#include <QXmlStreamReader>
#include <QXmlStreamWriter>
@@ -184,8 +183,6 @@ public:
bool operator==(const AudioParams& other) const;
bool operator!=(const AudioParams& other) const;
static QAudioFormat::SampleType GetQtSampleType(Format format);
static const QVector<uint64_t> kSupportedChannelLayouts;
static const QVector<int> kSupportedSampleRates;