11#define LOG100 4.60517018599
95 volume =
qMax(
float(0), volume);
100 return qPow(volume,
float(1 / 3.0));
102 return 1 - std::exp(-volume *
LOG100);
107 return float(20.0) * std::log10(volume);
111 volume =
qMax(
float(0), volume);
114 return volume * volume * volume;
118 return 1 - std::exp(-volume * volume * volume *
LOG100);
123 return float(3.0 * 20.0) * std::log10(volume);
127 volume =
qMax(
float(0), volume);
133 return -std::log(1 - volume) /
LOG100;
138 return qPow(-std::log(1 - volume) /
LOG100,
float(1 / 3.0));
144 else if (volume > 0.99)
147 return float(20.0) * std::log10(-std::log(1 - volume) /
LOG100);
153 return qPow(
float(10.0), volume /
float(20.0));
155 return qPow(
float(10.0), volume /
float(3.0 * 20.0));
160 return 1 - std::exp(-
qPow(
float(10.0), volume /
float(20.0)) *
LOG100);
172#ifndef QT_NO_DEBUG_STREAM
188 dbg <<
"UnderrunError";
203 dbg <<
"ActiveState";
206 dbg <<
"SuspendedState";
209 dbg <<
"StoppedState";
224 dbg <<
"LinearVolumeScale";
227 dbg <<
"CubicVolumeScale";
230 dbg <<
"LogarithmicVolumeScale";
233 dbg <<
"DecibelVolumeScale";
The QAudio namespace contains enums used by the audio classes.
State
\value ActiveState Audio data is being processed, this state is set after start() is called and while...
Error
\value NoError No errors have occurred \value OpenError An error occurred opening the audio device \v...
float convertVolume(float volume, VolumeScale from, VolumeScale to)
Converts an audio volume from a volume scale to another, and returns the result.
VolumeScale
This enum defines the different audio volume scales.
Combined button and popup list for selecting options.
QDebug operator<<(QDebug dbg, QAudio::Error error)
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