mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-23 13:55:36 +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
@@ -43,6 +43,30 @@ namespace BlackCore
|
||||
virtual void setInputDevice(const BlackMisc::Audio::CAudioDeviceInfo &device) = 0;
|
||||
};
|
||||
|
||||
class BLACKCORE_EXPORT CAudioInputDeviceDummy : public IAudioInputDevice
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
//! Constructor
|
||||
CAudioInputDeviceDummy(QObject *parent = nullptr) : IAudioInputDevice(parent) {}
|
||||
|
||||
//! Destructor
|
||||
virtual ~CAudioInputDeviceDummy() override = default;
|
||||
|
||||
//! \copydoc IAudioInputDevice::getInputDevices
|
||||
virtual const BlackMisc::Audio::CAudioDeviceInfoList &getInputDevices() const override { return m_devices; }
|
||||
|
||||
//! \copydoc IAudioInputDevice::getCurrentInputDevice
|
||||
virtual const BlackMisc::Audio::CAudioDeviceInfo &getCurrentInputDevice() const override { return m_currentDevice; }
|
||||
|
||||
//! \copydoc IAudioInputDevice::setInputDevice
|
||||
virtual void setInputDevice(const BlackMisc::Audio::CAudioDeviceInfo &device) override { m_currentDevice = device; }
|
||||
|
||||
private:
|
||||
BlackMisc::Audio::CAudioDeviceInfoList m_devices; /*!< in and output devices */
|
||||
BlackMisc::Audio::CAudioDeviceInfo m_currentDevice;
|
||||
};
|
||||
|
||||
//! Audio Output Device
|
||||
class IAudioOutputDevice : public QObject
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user