mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 09:15:34 +08:00
[MacOS] Ask user for permission to access microphone
This is required for MacOS 10.14 and later. This also requires an explanation why access is required in the apps Info.plist. Hence added custom Info.plist templates for each app.
This commit is contained in:
committed by
Klaus Basan
parent
61adfefa7a
commit
5f00747d19
@@ -30,6 +30,7 @@
|
||||
#include "blackmisc/network/userlist.h"
|
||||
#include "blackmisc/settingscache.h"
|
||||
#include "blackmisc/icons.h"
|
||||
#include "blackmisc/macos/microphoneaccess.h"
|
||||
#include "blacksound/selcalplayer.h"
|
||||
#include "blacksound/notificationplayer.h"
|
||||
|
||||
@@ -120,6 +121,12 @@ namespace BlackCore
|
||||
CContextAudio *registerWithDBus(BlackMisc::CDBusServer *server);
|
||||
|
||||
private:
|
||||
void initVoiceChannels();
|
||||
void initInputDevice();
|
||||
void initOutputDevice();
|
||||
void initAudioMixer();
|
||||
void initVoiceVatlib(bool allocateInput = true);
|
||||
|
||||
//! \copydoc IVoice::connectionStatusChanged
|
||||
//! \sa IContextAudio::changedVoiceRooms
|
||||
void onConnectionStatusChanged(IVoiceChannel::ConnectionStatus oldStatus, IVoiceChannel::ConnectionStatus newStatus);
|
||||
@@ -152,6 +159,11 @@ namespace BlackCore
|
||||
const int MinUnmuteVolume = 20; //!< minimum volume when unmuted
|
||||
int m_outVolumeBeforeMute = 90;
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
BlackMisc::CMacOSMicrophoneAccess m_micAccess;
|
||||
void delayedInitMicrophone();
|
||||
#endif
|
||||
|
||||
// For easy access.
|
||||
QSharedPointer<IVoiceChannel> m_channel1;
|
||||
QSharedPointer<IVoiceChannel> m_channel2;
|
||||
|
||||
Reference in New Issue
Block a user