Entropy Piano Tuner  1.1.3 (documentation not yet complete)
An open-source experimental software for piano tuning by entropy minimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
AudioPlayerForQt Class Reference

The AudioPlayerForQt class. More...

#include <audioplayerforqt.h>

+ Inheritance diagram for AudioPlayerForQt:
+ Collaboration diagram for AudioPlayerForQt:

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...
 
PCMWriterInterfacegetWriter ()
 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
 
AudioPlayerThreadForQtmQtAudioManager
 

Additional Inherited Members

- Public Types inherited from AudioBase
typedef double PCMDataType
 
typedef std::vector< PCMDataTypePacketType
 Type definition of a PCM packet (vector of PCM values). More...
 

Detailed Description

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.

Constructor & Destructor Documentation

AudioPlayerForQt::AudioPlayerForQt ( QObject *  parent)

Constructor, starting a Qt-thread.

Parameters
parent: Qt object to which the audio player belongs

Definition at line 35 of file audioplayerforqt.cpp.

+ Here is the call graph for this function:

AudioPlayerForQt::~AudioPlayerForQt ( )
inline

Definition at line 42 of file audioplayerforqt.h.

Member Function Documentation

void AudioPlayerForQt::errorString ( QString  s)
privateslot

Definition at line 110 of file audioplayerforqt.cpp.

void AudioPlayerForQt::exit ( )
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.

+ Here is the call graph for this function:

void AudioPlayerForQt::init ( )
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.

+ Here is the call graph for this function:

void AudioPlayerForQt::start ( )
finaloverridevirtual

Start/restart the audio device.

Implements AudioBase.

Definition at line 96 of file audioplayerforqt.cpp.

+ Here is the call graph for this function:

void AudioPlayerForQt::stop ( )
finaloverridevirtual

Stop the audio device.

Implements AudioBase.

Definition at line 103 of file audioplayerforqt.cpp.

+ Here is the call graph for this function:

Member Data Documentation

AudioPlayerThreadForQt* AudioPlayerForQt::mQtAudioManager
private

Definition at line 54 of file audioplayerforqt.h.

QThread* AudioPlayerForQt::mQtThread
private

Definition at line 53 of file audioplayerforqt.h.


The documentation for this class was generated from the following files: