Entropy Piano Tuner
1.1.3 (documentation not yet complete)
An open-source experimental software for piano tuning by entropy minimization
|
The AudioPlayerForQt class. More...
#include <audioplayerforqt.h>
Public Member Functions | |
AudioPlayerForQt (QObject *parent) | |
Constructor, starting a Qt-thread. More... | |
~AudioPlayerForQt () | |
void | init () overridefinal |
Initialize the AudioPlayerForQt. More... | |
void | exit () overridefinal |
Exit from the AudioPlayerForQt. More... | |
void | start () overridefinal |
Start/restart the audio device. More... | |
void | stop () overridefinal |
Stop the audio device. More... | |
Public Member Functions inherited from AudioPlayerAdapter | |
AudioPlayerAdapter () | |
Constructor, resetting default values. More... | |
virtual | ~AudioPlayerAdapter () |
Destructor without functionality. More... | |
void | setWriter (PCMWriterInterface *interface) |
Connect the audio adapter to a PCM writer interface. More... | |
PCMWriterInterface * | getWriter () |
Get pointer to the PCM writer. More... | |
void | setMuted (bool muted) |
Mute the audio player. More... | |
bool | isMuted () |
Returns true if the player is muted. More... | |
Public Member Functions inherited from AudioBase | |
AudioBase () | |
Constructor. More... | |
virtual | ~AudioBase () |
Destructor (no functionality). More... | |
const std::string & | getDeviceName () const |
Get a readable string of the name of the audio device. More... | |
void | setDeviceName (const std::string &n) |
Set the device name. More... | |
int | getSamplingRate () const |
Get the actual sampling rate. More... | |
virtual void | setSamplingRate (int rate) |
Allow the implementation to change the sampling rate during operation. More... | |
int | getChannelCount () const |
Get the actual number of channels (1=mono, 2=stereo). More... | |
virtual void | setChannelCount (int cnt) |
Set the number of channels (1=mono, 2=stereo). More... | |
Private Slots | |
void | errorString (QString) |
Private Attributes | |
QThread * | mQtThread |
AudioPlayerThreadForQt * | mQtAudioManager |
Additional Inherited Members | |
Public Types inherited from AudioBase | |
typedef double | PCMDataType |
typedef std::vector< PCMDataType > | PacketType |
Type definition of a PCM packet (vector of PCM values). More... | |
The AudioPlayerForQt class.
This class implements the audio player for Qt. Its main purpose is to start an indpendent Qt-compatible thread because the Qt audio player must be operated from a single Qt-thread only.
Definition at line 36 of file audioplayerforqt.h.
AudioPlayerForQt::AudioPlayerForQt | ( | QObject * | parent | ) |
Constructor, starting a Qt-thread.
parent | : Qt object to which the audio player belongs |
Definition at line 35 of file audioplayerforqt.cpp.
|
inline |
Definition at line 42 of file audioplayerforqt.h.
|
privateslot |
Definition at line 110 of file audioplayerforqt.cpp.
|
finaloverridevirtual |
Exit from the AudioPlayerForQt.
Register the execution thread of the audio player for termination. Wait in idle state until the thread has terminated.
Reimplemented from AudioPlayerAdapter.
Definition at line 82 of file audioplayerforqt.cpp.
|
finaloverridevirtual |
Initialize the AudioPlayerForQt.
This function starts an indpendent Qt-compatible thread in which the audio device is instantiated and started.
Implements AudioBase.
Definition at line 56 of file audioplayerforqt.cpp.
|
finaloverridevirtual |
Start/restart the audio device.
Implements AudioBase.
Definition at line 96 of file audioplayerforqt.cpp.
|
finaloverridevirtual |
Stop the audio device.
Implements AudioBase.
Definition at line 103 of file audioplayerforqt.cpp.
|
private |
Definition at line 54 of file audioplayerforqt.h.
|
private |
Definition at line 53 of file audioplayerforqt.h.