|
|
|
Location:
SoundDevice.h
Link against: MMFDevSound.lib
class MDevSoundObserver;
Supported from 7.0s
An interface to a set of DevSound callback functions.
This serves as the method of communication between the client and the DevSound. The class is a mixin and is intended to be inherited by the client class that is interested in observing the DevSound operation. The functions encapsulated by this class are called when specific events occur in the process of initialising and playing/recording an audio sample or playing tones using CMMFDevSound.
Defined in MDevSoundObserver:
BufferToBeEmptied(), BufferToBeFilled(), ConvertError(), DeviceMessage(), InitializeComplete(), PlayError(), RecordError(), SendEventToClient(), ToneFinished()
virtual void InitializeComplete(TInt aError)=0;
Initialisation completion event.
A derived class must provide an implementation to handle the initialisation request. This method is called when CMMFDevSound::InitializeL() completes successfully or otherwise.
|
virtual void ToneFinished(TInt aError)=0;
Tone play completion event.
A derived class must provide an implementation to handle the tone play completion request. This method is called when an attempt to play tone has completed, successfully or otherwise. The CMMFDevSound play tone methods that can trigger this event are: PlayToneL(), PlayDMTFStringL(), PlayToneSequenceL(), and PlayFixedSequenceL().
|
virtual void BufferToBeFilled(CMMFBuffer* aBuffer)=0;
CMMFDevSound play/convert data request events.
A derived class must provide an implementation to supply the CMMFDevSound object with the data that it needs to play or convert. This method is called when data is required for playing or converting. The observer should notify the CMMFDevSound object as quickly as possible after the data is read into aBuffer by calling CMMFDevSound::PlayData(). Failure to respond quickly enough may result in a PlayError() callback with an error code of KErrUnderflow.
|
virtual void PlayError(TInt aError)=0;
Play completion or cancel event.
A derived class must provide an implementation to handle the play completion or cancel request. CMMFDevSound calls this method when an attempt to play audio sample has completed, successfully or otherwise.
|
virtual void BufferToBeEmptied(CMMFBuffer* aBuffer)=0;
CMMFDevSound record/convert data request events.
A derived class must provide an implementation to supply CMMFDevSound object the data that it needs to record or convert. This method is called when the data buffer required for recording or converting is full. The observer should notify the CMMFDevSound object as quickly as possible after the data in aBuffer is processed (for example copying it to another buffer or to a file) by calling CMMFDevSound::RecordData(). Failure to respond quick enough may result in a RecordError() callback with an error code of KErrOverflow.
|
virtual void RecordError(TInt aError)=0;
Record completion or cancel event.
A derived class must provide an implementation to handle the record completion or cancel request. CMMFDevSound calls this method when an attempt to record audio sample has completed, successfully or otherwise.
|
virtual void ConvertError(TInt aError)=0;
Conversion completion or cancel event.
A derived class must provide an implementation to handle the record completion or cancel request. CMMFDevSound calls this method when an attempt to convert data from source format to destination format has completed, successfully or otherwise.
|
virtual void DeviceMessage(TDesC8& aMsg)=0;
Device event.
A derived class must provide an implementation to handle the messages from an audio hardware device. This method is called when a message is received from the audio hardware device, for example when a custom command is issued to hardware device.
|
virtual void SendEventToClient(const TMMFEvent&);
Policy request completion event.
A derived class must provide an implementation to handle the policy request completion event. This method is called when an attempt to acquire a sound device is rejected by audio policy server.
|