Files
pilotclient/src/blackcore/audiodevice.h
Roland Winklmeier 24ebc2ce7f Set the actually opened audio device from vatlib
In the past, the optional arguments currentInput and currentOutput were not
used. Therefore we never knew which device was actually opened by vatlib.
This caused the Audio UI to be completely unsychronized from the reality
when loading swiftgui.

ref T337
2018-09-12 20:30:33 +02:00

78 lines
2.3 KiB
C++

/* Copyright (C) 2014
* swift project community / contributors
*
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
* including this file, may be copied, modified, propagated, or distributed except according to the terms
* contained in the LICENSE file.
*/
//! \file
#ifndef BLACKCORE_AUDIODEVICE_H
#define BLACKCORE_AUDIODEVICE_H
#include "blackcoreexport.h"
#include "blackmisc/audio/audiodeviceinfo.h"
#include "blackmisc/audio/audiodeviceinfolist.h"
#include <QObject>
namespace BlackCore
{
//! Audio Input Device
//! \todo Settings classes to store hardware settings (hardware device)
class BLACKCORE_EXPORT IAudioInputDevice : public QObject
{
Q_OBJECT
public:
//! Constructor
IAudioInputDevice(QObject *parent = nullptr) : QObject(parent) {}
//! Destructor
virtual ~IAudioInputDevice() {}
//! Get available input devices
virtual const BlackMisc::Audio::CAudioDeviceInfoList &getInputDevices() const = 0;
//! Current input device
virtual const BlackMisc::Audio::CAudioDeviceInfo &getCurrentInputDevice() const = 0;
//! Set new input device
virtual void setInputDevice(const BlackMisc::Audio::CAudioDeviceInfo &device) = 0;
};
//! Audio Output Device
class IAudioOutputDevice : public QObject
{
Q_OBJECT
public:
//! Constructor
IAudioOutputDevice(QObject *parent = nullptr) : QObject(parent) {}
//! Destructor
virtual ~IAudioOutputDevice() {}
//! Get available output devices
virtual const BlackMisc::Audio::CAudioDeviceInfoList &getOutputDevices() const = 0;
//! Current output device
virtual const BlackMisc::Audio::CAudioDeviceInfo &getCurrentOutputDevice() const = 0;
//! Set new output device
virtual void setOutputDevice(const BlackMisc::Audio::CAudioDeviceInfo &device) = 0;
//! Set output volume between 0 ... 300%
virtual void setOutputVolume(int volume) = 0;
//! Get output volume between 0 ... 300%
virtual int getOutputVolume() const = 0;
};
}
#endif // guard