11#define LOG100 4.60517018599
97 volume =
qMax(
float(0), volume);
102 return qPow(volume,
float(1 / 3.0));
104 return 1 - std::exp(-volume *
LOG100);
109 return float(20.0) * std::log10(volume);
113 volume =
qMax(
float(0), volume);
116 return volume * volume * volume;
120 return 1 - std::exp(-volume * volume * volume *
LOG100);
125 return float(3.0 * 20.0) * std::log10(volume);
129 volume =
qMax(
float(0), volume);
135 return -std::log(1 - volume) /
LOG100;
140 return qPow(-std::log(1 - volume) /
LOG100,
float(1 / 3.0));
146 else if (volume > 0.99)
149 return float(20.0) * std::log10(-std::log(1 - volume) /
LOG100);
155 return qPow(
float(10.0), volume /
float(20.0));
157 return qPow(
float(10.0), volume /
float(3.0 * 20.0));
162 return 1 - std::exp(-
qPow(
float(10.0), volume /
float(20.0)) *
LOG100);
174#ifndef QT_NO_DEBUG_STREAM
190 dbg <<
"UnderrunError";
205 dbg <<
"ActiveState";
208 dbg <<
"SuspendedState";
211 dbg <<
"StoppedState";
226 dbg <<
"LinearVolumeScale";
229 dbg <<
"CubicVolumeScale";
232 dbg <<
"LogarithmicVolumeScale";
235 dbg <<
"DecibelVolumeScale";
Q_MULTIMEDIA_EXPORT float convertVolume(float volume, VolumeScale from, VolumeScale to)
Converts an audio volume from a volume scale to another, and returns the result.
Combined button and popup list for selecting options.
DBusConnection const char DBusError * error
bool qFuzzyIsNull(qfloat16 f) noexcept
constexpr const T & qMax(const T &a, const T &b)
GLenum GLenum GLenum GLenum GLenum scale
QDebug operator<<(QDebug dbg, QAudio::Error error)