#include "common.h"
+const int BLUETOOTH_RECONNECT_UNMUTE_DELAY = 5000; // Milliseconds
+
enum MuteType {
// With restore
MuteTypeWorkstationLock = 0,
L"Volume restored",
L"All endpoints have been restored to their previous configuration");
if (withDelay) {
- Sleep(2000);
+ Sleep(BLUETOOTH_RECONNECT_UNMUTE_DELAY);
}
winAudio_->RestoreMuteStatus();
}
WMLog::GetInstance().Write(
L"Mute Event: Bluetooth audio device %s",
connected ? L"connected" : L"disconnected");
- NotifyRestoreCondition(MuteTypeBluetoothDisconnect, !connected);
+ NotifyRestoreCondition(MuteTypeBluetoothDisconnect, !connected, true);
}
void MuteControl::NotifyLogout()
const TrayIcon* trayIcon_;
- void NotifyRestoreCondition(int type, bool active, bool withDelay);
+ void NotifyRestoreCondition(int type, bool active, bool withDelay = false);
void SaveMuteStatus();
void RestoreVolume(bool withDelay = false);
void ShowNotification(const std::wstring& title, const std::wstring& text);