mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
do not warn, when requesting the volume from an invalid audio device
Instead, we return a defined value (0.0) and keep quiet otherwise.
This commit is contained in:
parent
da6bed19b2
commit
ffbd8fba91
|
@ -321,13 +321,12 @@ qreal Audio::outputVolume()
|
||||||
{
|
{
|
||||||
QMutexLocker locker(&d->audioLock);
|
QMutexLocker locker(&d->audioLock);
|
||||||
|
|
||||||
if (!d->alMainSource) {
|
ALfloat volume = 0.0;
|
||||||
qWarning("Audio output source not initialized.");
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
ALfloat volume;
|
if (d->alOutDev) {
|
||||||
alGetListenerf(AL_GAIN, &volume);
|
alGetListenerf(AL_GAIN, &volume);
|
||||||
|
CHECK_AL_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
return volume;
|
return volume;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user