|
Classified ads
|
Class for alerting user in case of incoming call. More...
#include <ringtoneplayer.h>


Public Slots | |
| virtual void | finishedPlaying (QAudio::State aState) |
| virtual void | notify () |
| void | stop () |
Signals | |
| void | error (int aError, const QString &aExplanation) |
Public Member Functions | |
| RingtonePlayer (Model &aModel, MController &aController) | |
| ~RingtonePlayer () | |
| void | timerEvent (QTimerEvent *event) |
| virtual void | callStatusChanged (quint32 aCallId, VoiceCallEngine::CallState aState) |
| virtual qint64 | bytesAvailable () const |
Protected Member Functions | |
| virtual qint64 | writeData (const char *data, qint64 maxSize) |
| virtual qint64 | readData (char *data, qint64 maxSize) |
| virtual bool | open (OpenMode mode) |
| virtual bool | isSequential () const |
Private Member Functions | |
| void | initInput () |
Private Attributes | |
| QAudioFormat | iFormat |
| QAudioOutput * | iAudioOutput |
| QByteArray | iAudioBuffer |
| bool | iNeedsToRun |
| QFile * | iRingtoneFile |
| int | iTimerId |
| OpusDecoder * | iDecoder |
| QByteArray | iDecodedData |
| QMutex * | iMutex |
| Model & | iModel |
| MController & | iController |
Class for alerting user in case of incoming call.
Class that plays selected ringtone or remains silent, depending on users selections.
| RingtonePlayer::RingtonePlayer | ( | Model & | aModel, |
| MController & | aController | ||
| ) |
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 | ( | ) |
|
inlinevirtual |
|
virtual |
Method that communicates changes in call state. From interface MCallStatusObserver.
Implements MVoiceCallEngine::MCallStatusObserver.
|
signal |
this is not method but signal ; if in error, get emit()ted
|
virtualslot |
Notify slot from actual player device
|
private |
initializes input and codec
|
inlineprotectedvirtual |
|
virtualslot |
notify from audio output device
|
protectedvirtual |
method for opening QIODevice: sets the open mode that's about it.
|
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.
| data | pointer to buffer where data will be written |
| maxSize | max data size available in buffer |
|
slot |
method for stopping playback
| void RingtonePlayer::timerEvent | ( | QTimerEvent * | event | ) |
From QObject. Used for feeding ringtone data to audio device
|
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.
| data | that will not be written anywhere. |
| maxSize | max data size to be not written |
|
private |
first buffered here, then written in chunks
|
private |
|
private |
|
private |
|
private |
ringtones are also opus-coded
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
1.8.11