Just Intonation  Version 1.3.0 (18)
Explore scale-independent dynamically adapting tuning in just intonation
AudioOutputDevice Class Reference

Audio Output Device, supporting 16 and 24 bit signed integer PCM. More...

#include <audioaoutputdevice.h>

Inheritance diagram for AudioOutputDevice:
Inheritance graph
Collaboration diagram for AudioOutputDevice:
Collaboration graph

Public Member Functions

 AudioOutputDevice (AudioOutput *audioplayerthread)
 Constructor, resetting the member variables. More...
 
bool connect (const AudioDeviceParameters &parameters)
 
void disconnect ()
 Stop the audio output device. More...
 
void setVolume (double volume)
 Set the global volume. More...
 
 AudioOutputDevice (AudioOutput *audiooutput)
 
bool connect (const AudioParameters &parameters)
 Connect and start the audio output device. More...
 
void disconnect ()
 
void setVolume (double volume)
 
void setVerbosity (int verbosity)
 Set the verbosity level of the class-specific messages. More...
 
int getVerbosity ()
 Get the actual verbosity level. More...
 

Private Member Functions

qint64 readData (char *data, qint64 maxSize) override final
 Read PCM data. More...
 
qint64 writeData (const char *data, qint64 maxSize) override final
 Empty implementation for writing without functionality. More...
 
qint64 readData (char *data, qint64 maxSize) override final
 
qint64 writeData (const char *data, qint64 maxSize) override final
 

Private Attributes

int mSampleSize
 Sample size in bits (16/24) More...
 
AudioOutputpAudioOutput
 Pointer back to AudioOutputThread. More...
 
QAudioOutput * pQtAudioOutputDriver
 Pointer to System-Qt audio driver. More...
 
QAudioOutput * pQtAudioOutputStream
 Pointer to System-Qt audio driver. More...
 

Detailed Description

Audio Output Device, supporting 16 and 24 bit signed integer PCM.

This is the link between the audio classes of the module and the Qt audio system, inheriting QIODevice.

Definition at line 38 of file audioaoutputdevice.h.

Constructor & Destructor Documentation

AudioOutputDevice::AudioOutputDevice ( AudioOutput audiooutput)

Constructor, resetting the member variables.

Parameters
audiooutput: Pointer back to the AudioOutput

Definition at line 37 of file audiooutputdevice.cpp.

AudioOutputDevice::AudioOutputDevice ( AudioOutput audiooutput)

Member Function Documentation

bool AudioOutputDevice::connect ( const AudioDeviceParameters &  parameters)
bool AudioOutputDevice::connect ( const AudioParameters parameters)

Connect and start the audio output device.

Parameters
parameters: AudioDeviceParameters used for the connection
Returns
True if device could be opened successfully.

Definition at line 52 of file audiooutputdevice.cpp.

void AudioOutputDevice::disconnect ( )

Stop the audio output device.

Definition at line 208 of file audiooutputdevice.cpp.

void AudioOutputDevice::disconnect ( )
int Log::getVerbosity ( )
inherited

Get the actual verbosity level.

Returns
: Verbosity level (1...4)

Definition at line 118 of file log.cpp.

qint64 AudioOutputDevice::readData ( char *  data,
qint64  maxSize 
)
finaloverrideprivate

Read PCM data.

This is a virtual function defined in QIODevice which is now implemented here. The call is redirected to the SoundGenerator.

Parameters
data: Pointer to the PCM data
maxSize: Maximal size to be generated in bytes
Returns
: Actual number of bytes that have been generated

Definition at line 245 of file audiooutputdevice.cpp.

Here is the call graph for this function:

qint64 AudioOutputDevice::readData ( char *  data,
qint64  maxSize 
)
finaloverrideprivate
void Log::setVerbosity ( int  verbosity)
inherited

Set the verbosity level of the class-specific messages.

Parameters
verbosity: Verbosity level (1...4)

Definition at line 107 of file log.cpp.

void AudioOutputDevice::setVolume ( double  volume)

Set the global volume.

Parameters
volume: Volume level between 0 and 1

Definition at line 227 of file audiooutputdevice.cpp.

void AudioOutputDevice::setVolume ( double  volume)
qint64 AudioOutputDevice::writeData ( const char *  data,
qint64  maxSize 
)
finaloverrideprivate

Empty implementation for writing without functionality.

This function is virtual in QIODevice and has to be implemented, even if it does nothing.

Parameters
data
maxSize
Returns
: Zero

Definition at line 263 of file audiooutputdevice.cpp.

qint64 AudioOutputDevice::writeData ( const char *  data,
qint64  maxSize 
)
finaloverrideprivate

Member Data Documentation

int AudioOutputDevice::mSampleSize
private

Sample size in bits (16/24)

Definition at line 54 of file audioaoutputdevice.h.

AudioOutput * AudioOutputDevice::pAudioOutput
private

Pointer back to AudioOutputThread.

Pointer back to AudioOutput.

Definition at line 55 of file audioaoutputdevice.h.

QAudioOutput* AudioOutputDevice::pQtAudioOutputDriver
private

Pointer to System-Qt audio driver.

Definition at line 56 of file audioaoutputdevice.h.

QAudioOutput* AudioOutputDevice::pQtAudioOutputStream
private

Pointer to System-Qt audio driver.

Definition at line 56 of file audiooutputdevice.h.


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