mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
fix(widget): don't try to play audio if it's disable
This commit is contained in:
parent
2bba12175e
commit
2ea5030958
|
@ -1008,6 +1008,11 @@ void Widget::setStatusMessage(const QString& statusMessage)
|
|||
*/
|
||||
void Widget::playNotificationSound(IAudioSink::Sound sound, bool loop)
|
||||
{
|
||||
if (!settings.getAudioOutDevEnabled()) {
|
||||
// don't try to play sounds if audio is disabled
|
||||
return;
|
||||
}
|
||||
|
||||
if (audioNotification == nullptr) {
|
||||
audioNotification = std::unique_ptr<IAudioSink>(audio.makeSink());
|
||||
if (audioNotification == nullptr) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user