swift
selcalplayer.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2016 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
5 
6 #ifndef SWIFT_SOUND_SELCALPLAYER_H
7 #define SWIFT_SOUND_SELCALPLAYER_H
8 
9 #include <chrono>
10 
12 #include "misc/aviation/selcal.h"
13 #include "misc/worker.h"
14 #include "sound/swiftsoundexport.h"
16 #include "sound/tonepair.h"
17 
18 namespace swift::sound
19 {
21  class SWIFT_SOUND_EXPORT CSelcalPlayer : public QObject
22  {
23  Q_OBJECT
24 
25  public:
27  CSelcalPlayer(const swift::misc::audio::CAudioDeviceInfo &device, QObject *parent = nullptr);
28 
30  virtual ~CSelcalPlayer() override;
31 
33  void gracefulShutdown();
34 
37  std::chrono::milliseconds play(int volume, const swift::misc::aviation::CSelcal &selcal);
38 
39  private:
40  CThreadedTonePairPlayer *m_threadedPlayer = nullptr;
41  };
42 } // namespace swift::sound
43 
44 #endif // SWIFT_SOUND_SELCALPLAYER_H
Value object encapsulating information of a audio device.
Value object for SELCAL.
Definition: selcal.h:31
Threaded tone player. Don't use it directly but use.
#define SWIFT_SOUND_EXPORT
Export a class or function from the library.