Just Intonation  Version 1.3.1 (19)
Explore key-independent dynamically adapting tuning in just intonation
audiodeviceguard.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright 2016-2017 Karolin Stange, Christoph Wick, and Haye Hinrichsen
3  *
4  * This file is part of JustIntonation.
5  *
6  * JustIntonation is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by the
8  * Free Software Foundation, either version 3 of the License, or (at your
9  * option) any later version.
10  *
11  * JustIntonation is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14  * for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with JustIntonation. If not, see http://www.gnu.org/licenses/.
18  *****************************************************************************/
19 
20 //=============================================================================
21 // Audio Device Guard
22 //=============================================================================
23 
24 #ifndef AUDIODEVICEGUARD_H
25 #define AUDIODEVICEGUARD_H
26 
27 #include <QTimer>
28 #include <QThread>
29 
30 #include "audiobase.h"
31 
41 
43 {
44  Q_OBJECT
45 public:
46  AudioDeviceGuard (AudioBase* output=nullptr);
48  bool startMonitoring (int seconds=20);
49 
50 private:
51  void periodicallyCalledWorker() override final;
52 
54 };
55 
56 #endif // AUDIODEVICEGUARD_H
Universal base class for threaded modules.
Definition: threadbase.h:60
~AudioDeviceGuard()
Destructor: Stop the timer, stop the thread and exit.
void periodicallyCalledWorker() override final
Thread worker function, calling updateListOfDevices() of the audio object. This thread is executed at...
Audio Device Guard.
AudioBase * pAudioBase
Pointer back to the audio object.
AudioDeviceGuard(AudioBase *output=nullptr)
Construtor of the AudioDeviceGuard.
bool startMonitoring(int seconds=20)
Start the AudioDeviceGuard.
Abstract base class for audio input and output.
Definition: audiobase.h:52