Class for alerting user in case of incoming call.
More...
#include <ringtoneplayer.h>
|
void | error (int aError, const QString &aExplanation) |
|
|
virtual qint64 | writeData (const char *data, qint64 maxSize) |
|
virtual qint64 | readData (char *data, qint64 maxSize) |
|
virtual bool | open (OpenMode mode) |
|
virtual bool | isSequential () const |
|
Class for alerting user in case of incoming call.
Class that plays selected ringtone or remains silent, depending on users selections.
◆ RingtonePlayer()
Constructor. When constructed, immediately begins to play. There is method for stop, and there is destructor. Destructor should not be called, calling stop will cause this class to deleteLater() itself.
◆ ~RingtonePlayer()
RingtonePlayer::~RingtonePlayer |
( |
| ) |
|
◆ bytesAvailable()
virtual qint64 RingtonePlayer::bytesAvailable |
( |
| ) |
const |
|
inlinevirtual |
◆ callStatusChanged()
Method that communicates changes in call state. From interface MCallStatusObserver.
◆ error
void RingtonePlayer::error |
( |
int |
aError, |
|
|
const QString & |
aExplanation |
|
) |
| |
|
signal |
this is not method but signal ; if in error, get emit()ted
◆ finishedPlaying
virtual void RingtonePlayer::finishedPlaying |
( |
QAudio::State |
aState | ) |
|
|
virtualslot |
Notify slot from actual player device
◆ initInput()
void RingtonePlayer::initInput |
( |
| ) |
|
|
private |
initializes input and codec
◆ isSequential()
virtual bool RingtonePlayer::isSequential |
( |
| ) |
const |
|
inlineprotectedvirtual |
◆ notify
virtual void RingtonePlayer::notify |
( |
| ) |
|
|
virtualslot |
notify from audio output device
◆ open()
virtual bool RingtonePlayer::open |
( |
OpenMode |
mode | ) |
|
|
protectedvirtual |
method for opening QIODevice: sets the open mode that's about it.
◆ readData()
virtual qint64 RingtonePlayer::readData |
( |
char * |
data, |
|
|
qint64 |
maxSize |
|
) |
| |
|
protectedvirtual |
From QIODevice: method that QAudioOutput class instance will use to read the actual audio data. Data comes from internal buffer and is inserted into buffer using insertAudioFrame.
- Parameters
-
data | pointer to buffer where data will be written |
maxSize | max data size available in buffer |
- Returns
- number of bytes actually written into buffer
◆ stop
void RingtonePlayer::stop |
( |
| ) |
|
|
slot |
method for stopping playback
◆ timerEvent()
void RingtonePlayer::timerEvent |
( |
QTimerEvent * |
event | ) |
|
From QObject. Used for feeding ringtone data to audio device
◆ writeData()
virtual qint64 RingtonePlayer::writeData |
( |
const char * |
data, |
|
|
qint64 |
maxSize |
|
) |
| |
|
protectedvirtual |
Write-method of QIODevice - QIODevice here is used for feeding the player and data is actually written using insertAudioFrame method so implementation of this method is actually empty.
- Parameters
-
data | that will not be written anywhere. |
maxSize | max data size to be not written |
- Returns
- always 0
◆ iAudioBuffer
QByteArray RingtonePlayer::iAudioBuffer |
|
private |
first buffered here, then written in chunks
◆ iAudioOutput
QAudioOutput* RingtonePlayer::iAudioOutput |
|
private |
◆ iController
◆ iDecodedData
QByteArray RingtonePlayer::iDecodedData |
|
private |
◆ iDecoder
OpusDecoder* RingtonePlayer::iDecoder |
|
private |
ringtones are also opus-coded
◆ iFormat
QAudioFormat RingtonePlayer::iFormat |
|
private |
◆ iModel
Model& RingtonePlayer::iModel |
|
private |
◆ iMutex
QMutex* RingtonePlayer::iMutex |
|
private |
◆ iNeedsToRun
bool RingtonePlayer::iNeedsToRun |
|
private |
◆ iRingtoneFile
QFile* RingtonePlayer::iRingtoneFile |
|
private |
◆ iTimerId
int RingtonePlayer::iTimerId |
|
private |
The documentation for this class was generated from the following file: