Entropy Piano Tuner
1.1.3 (documentation not yet complete)
An open-source experimental software for piano tuning by entropy minimization
|
Class for the audio player thread. More...
#include <audioplayerthreadforqt.h>
Public Types | |
typedef int16_t | DataFormat |
Public Slots | |
void | workerFunction () |
Main worker function of the Qt audio manager. More... | |
Signals | |
void | finished () |
void | error (QString err) |
Public Member Functions | |
AudioPlayerThreadForQt (AudioPlayerForQt *audio) | |
Constructor. More... | |
~AudioPlayerThreadForQt () | |
void | registerForTermination () |
void | setPause (bool pause) |
Pause the audio player. More... | |
bool | isRunning () |
Static Public Attributes | |
static const double | BufferMilliseconds = 50 |
Private Member Functions | |
void | init () |
Initialize the audio player. More... | |
void | exit () |
Exit from the Qt audio player. More... | |
void | start () |
Start the Qt audio device. More... | |
void | stop () |
Stop the Qt audio device. More... | |
Private Attributes | |
AudioPlayerForQt * | mAudioSource |
Audio source where the data comes from. More... | |
QAudioOutput * | mAudioSink |
Audio sink to which the data is sent. More... | |
QIODevice * | mIODevice |
Qt IO device pointer. More... | |
std::atomic< bool > | mThreadRunning |
Boolean indicating that the thread is running. More... | |
std::atomic< bool > | mPause |
Boolean indicating that the thread is pausing. More... | |
Class for the audio player thread.
This class serves as a container for the workerFunction in which the thread is running.
Definition at line 36 of file audioplayerthreadforqt.h.
typedef int16_t AudioPlayerThreadForQt::DataFormat |
Definition at line 42 of file audioplayerthreadforqt.h.
AudioPlayerThreadForQt::AudioPlayerThreadForQt | ( | AudioPlayerForQt * | audio | ) |
Constructor.
audio | : Pointer to the AudioPlayerForQt which created the instance. |
Definition at line 38 of file audioplayerthreadforqt.cpp.
|
inline |
Definition at line 44 of file audioplayerthreadforqt.h.
|
signal |
|
private |
Exit from the Qt audio player.
Definition at line 155 of file audioplayerthreadforqt.cpp.
|
signal |
|
private |
Initialize the audio player.
This function defines the format, looks for the available audio device, manages fallbacks to supported formats, and defines the size of the internal Qt buffer.
Definition at line 59 of file audioplayerthreadforqt.cpp.
|
inline |
Definition at line 48 of file audioplayerthreadforqt.h.
|
inline |
Definition at line 46 of file audioplayerthreadforqt.h.
void AudioPlayerThreadForQt::setPause | ( | bool | pause | ) |
Pause the audio player.
pause | Pause |
Definition at line 232 of file audioplayerthreadforqt.cpp.
|
private |
Start the Qt audio device.
Definition at line 182 of file audioplayerthreadforqt.cpp.
|
private |
Stop the Qt audio device.
Definition at line 210 of file audioplayerthreadforqt.cpp.
|
slot |
Main worker function of the Qt audio manager.
Definition at line 246 of file audioplayerthreadforqt.cpp.
|
static |
Definition at line 41 of file audioplayerthreadforqt.h.
|
private |
Audio sink to which the data is sent.
Definition at line 65 of file audioplayerthreadforqt.h.
|
private |
Audio source where the data comes from.
Definition at line 64 of file audioplayerthreadforqt.h.
|
private |
Qt IO device pointer.
Definition at line 66 of file audioplayerthreadforqt.h.
|
private |
Boolean indicating that the thread is pausing.
Definition at line 68 of file audioplayerthreadforqt.h.
|
private |
Boolean indicating that the thread is running.
Definition at line 67 of file audioplayerthreadforqt.h.