mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 14:55:36 +08:00
QAudioDeviceInfo is a low level technical class, which shouldn't be used in higher level code. Remove it from all APIs where possible and just create it in order to interface with QAudio
45 lines
1.3 KiB
C++
45 lines
1.3 KiB
C++
/* Copyright (C) 2016
|
|
* 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. 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 BLACKSOUND_SELCALPLAYER_H
|
|
#define BLACKSOUND_SELCALPLAYER_H
|
|
|
|
#include "blacksound/threadedtonepairplayer.h"
|
|
#include "blacksound/tonepair.h"
|
|
#include "blacksoundexport.h"
|
|
#include "blackmisc/audio/audiodeviceinfo.h"
|
|
#include "blackmisc/aviation/selcal.h"
|
|
#include "blackmisc/worker.h"
|
|
|
|
namespace BlackSound
|
|
{
|
|
//! SELCAL player
|
|
class BLACKSOUND_EXPORT CSelcalPlayer : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
//! Constructor
|
|
CSelcalPlayer(const BlackMisc::Audio::CAudioDeviceInfo &device, QObject *parent = nullptr);
|
|
|
|
//! Destructor
|
|
virtual ~CSelcalPlayer() override;
|
|
|
|
//! Play SELCAL
|
|
//! \return Time of the played tone
|
|
BlackMisc::PhysicalQuantities::CTime play(int volume, const BlackMisc::Aviation::CSelcal &selcal);
|
|
|
|
private:
|
|
CThreadedTonePairPlayer m_threadedPlayer;
|
|
};
|
|
}
|
|
|
|
#endif // guard
|