RMMFDevSoundProxy Class Reference

class RMMFDevSoundProxy : public RMmfSessionBase

Main interface to DevSound server.

MmfDevSoundProxy.lib
Since

Inherits from

Public Member Functions
RMMFDevSoundProxy ()
IMPORT_C void AsyncCustomCommand ( TUid , TRequestStatus &, const TDesC8 &, const TDesC8 &, TDes8 *)
void BufferToBeEmptied ( CMMFBuffer *)
IMPORT_C TInt BufferToBeEmptiedData ( TMMFDevSoundProxyHwBufPckg &)
void BufferToBeFilled ( CMMFBuffer *)
IMPORT_C TInt BufferToBeFilledData ( TBool , TMMFDevSoundProxyHwBufPckg &)
IMPORT_C TInt CancelInitialize ()
IMPORT_C TInt CancelRegisterAsClient ( TUid )
IMPORT_C TMMFCapabilities Capabilities ()
IMPORT_C void Close ()
IMPORT_C TMMFCapabilities Config ()
void ConvertError ( TInt )
IMPORT_C void CustomCommandAsync (const TMMFMessageDestinationPckg &, TInt , const TDesC8 &, const TDesC8 &, TDes8 &, TRequestStatus &)
IMPORT_C void CustomCommandAsync (const TMMFMessageDestinationPckg &, TInt , const TDesC8 &, const TDesC8 &, TRequestStatus &)
IMPORT_C TInt CustomCommandSync (const TMMFMessageDestinationPckg &, TInt , const TDesC8 &, const TDesC8 &, TDes8 &)
IMPORT_C TInt CustomCommandSync (const TMMFMessageDestinationPckg &, TInt , const TDesC8 &, const TDesC8 &)
IMPORT_C TAny * CustomInterface ( TUid )
void DeviceMessage ( TUid , const TDesC8 &)
IMPORT_C TInt EmptyBuffers ()
IMPORT_C TInt FixedSequenceCount ()
IMPORT_C const TDesC & FixedSequenceName ( TInt )
IMPORT_C TInt Gain ()
IMPORT_C void GetPlayBalanceL ( TInt &, TInt &)
IMPORT_C void GetRecordBalanceL ( TInt &, TInt &)
IMPORT_C TInt GetResourceNotificationData ( TUid , TDes8 &)
IMPORT_C void GetSupportedInputDataTypesL ( RArray < TFourCC > &, const TMMFPrioritySettings &)
IMPORT_C void GetSupportedOutputDataTypesL ( RArray < TFourCC > &, const TMMFPrioritySettings &)
IMPORT_C TInt GetTimePlayed ( TTimeIntervalMicroSeconds &)
void InitializeComplete ( TInt )
IMPORT_C void InitializeL ( MDevSoundObserver &, TMMFState , MMMFDevSoundCustomInterfaceObserver &)
IMPORT_C void InitializeL ( MDevSoundObserver &, TUid , TMMFState , MMMFDevSoundCustomInterfaceObserver &)
IMPORT_C void InitializeL ( MDevSoundObserver &, TFourCC , TMMFState , MMMFDevSoundCustomInterfaceObserver &)
IMPORT_C TBool IsResumeSupported ()
IMPORT_C TInt MaxGain ()
IMPORT_C TInt MaxVolume ()
IMPORT_C TInt Open ()
IMPORT_C void Pause ()
IMPORT_C void PlayDTMFStringL (const TDesC &)
IMPORT_C void PlayData ()
IMPORT_C void PlayDualToneL ( TInt , TInt , const TTimeIntervalMicroSeconds &)
void PlayError ( TInt )
IMPORT_C void PlayFixedSequenceL ( TInt )
IMPORT_C void PlayInitL ()
IMPORT_C void PlayToneL ( TInt , const TTimeIntervalMicroSeconds &)
IMPORT_C void PlayToneSequenceL (const TDesC8 &)
IMPORT_C TInt PostOpen ()
IMPORT_C void RecordData ()
void RecordError ( TInt )
IMPORT_C void RecordInitL ()
IMPORT_C TInt RegisterAsClient ( TUid , const TDesC8 &)
IMPORT_C TInt Resume ()
IMPORT_C TInt SamplesPlayed ()
IMPORT_C TInt SamplesRecorded ()
void SendEventToClient (const TMMFEvent &)
IMPORT_C TInt SetClientThreadInfo ( TThreadId &)
IMPORT_C void SetConfigL (const TMMFCapabilities &)
IMPORT_C void SetDTMFLengths ( TTimeIntervalMicroSeconds32 &, TTimeIntervalMicroSeconds32 &, TTimeIntervalMicroSeconds32 &)
IMPORT_C TInt SetDevSoundInfo ()
IMPORT_C TInt SetGain ( TInt )
IMPORT_C void SetPlayBalanceL ( TInt , TInt )
IMPORT_C void SetPrioritySettings (const TMMFPrioritySettings &)
IMPORT_C void SetRecordBalanceL ( TInt , TInt )
IMPORT_C void SetToneRepeats ( TInt , const TTimeIntervalMicroSeconds &)
IMPORT_C TInt SetVolume ( TInt )
IMPORT_C void SetVolumeRamp (const TTimeIntervalMicroSeconds &)
IMPORT_C void Stop ()
IMPORT_C TInt SyncCustomCommand ( TUid , const TDesC8 &, const TDesC8 &, TDes8 *)
void ToneFinished ( TInt )
IMPORT_C TInt Volume ()
IMPORT_C TInt WillResumePlay ()
Private Member Functions
void StartReceivingMsgQueueHandlerEventsL ( MMMFDevSoundCustomInterfaceObserver &)
Inherited Functions
RHandleBase::Attributes()const
RHandleBase::BTraceId()const
RHandleBase::DoExtendedClose()
RHandleBase::Duplicate(const RThread &,TOwnerType)
RHandleBase::FullName()const
RHandleBase::FullName(TDes &)const
RHandleBase::Handle()const
RHandleBase::HandleInfo(THandleInfo *)
RHandleBase::Name()const
RHandleBase::NotifyDestruction(TRequestStatus &)
RHandleBase::Open(const TFindHandleBase &,TOwnerType)
RHandleBase::OpenByName(const TDesC &,TOwnerType,TInt)
RHandleBase::RHandleBase()
RHandleBase::RHandleBase(TInt)
RHandleBase::SetHandle(TInt)
RHandleBase::SetHandleNC(TInt)
RMmfSessionBase::SendReceive(TInt)const
RMmfSessionBase::SendReceive(TInt,TInt)const
RMmfSessionBase::SendReceive(TInt,TInt,TInt)const
RMmfSessionBase::SendReceive(TInt,TInt,TInt,TRequestStatus &)const
RMmfSessionBase::SendReceive(TInt,TInt,TRequestStatus &)const
RMmfSessionBase::SendReceive(TInt,TInt,const TDesC8 &,const TDesC8 &)const
RMmfSessionBase::SendReceive(TInt,TInt,const TDesC8 &,const TDesC8 &,TRequestStatus &)const
RMmfSessionBase::SendReceive(TInt,TRequestStatus &)const
RMmfSessionBase::SendReceive(TInt,const TDesC &)const
RMmfSessionBase::SendReceive(TInt,const TDesC &,TRequestStatus &)const
RMmfSessionBase::SendReceive(TInt,const TDesC8 &)const
RMmfSessionBase::SendReceive(TInt,const TDesC8 &,TRequestStatus &)const
RMmfSessionBase::SendReceive(TInt,const TDesC8 &,const TDesC8 &)const
RMmfSessionBase::SendReceive(TInt,const TDesC8 &,const TDesC8 &,TRequestStatus &)const
RMmfSessionBase::SendReceive(TInt,const TDesC8 &,const TDesC8 &,const TDesC8 &)const
RMmfSessionBase::SendReceive(TInt,const TDesC8 &,const TDesC8 &,const TDesC8 &,TRequestStatus &)const
RMmfSessionBase::SendReceiveResult(TInt,TDes8 &)const
RMmfSessionBase::SendReceiveResult(TInt,TDes8 &,TRequestStatus &)const
RMmfSessionBase::SendReceiveResult(TInt,TInt,const TDesC8 &,const TDesC8 &,TDes8 &)const
RMmfSessionBase::SendReceiveResult(TInt,TInt,const TDesC8 &,const TDesC8 &,TDes8 &,TRequestStatus &)const
RMmfSessionBase::SendReceiveResult(TInt,const TDesC8 &,const TDesC8 &,TDes &)const
RMmfSessionBase::SendReceiveResult(TInt,const TDesC8 &,const TDesC8 &,TDes8 &)const
RMmfSessionBase::SendReceiveResult(TInt,const TDesC8 &,const TDesC8 &,TDes8 &,TRequestStatus &)const
RMmfSessionBase::SendReceiveResult(TInt,const TDesC8 &,const TDesC8 &,const TDesC8 &,TDes8 &)const
RMmfSessionBase::SendReceiveResult(TInt,const TDesC8 &,const TDesC8 &,const TDesC8 &,TDes8 &,TRequestStatus &)const
RSessionBase::CreateSession(RServer2,const TVersion &)
RSessionBase::CreateSession(RServer2,const TVersion &,TInt)
RSessionBase::CreateSession(RServer2,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
RSessionBase::CreateSession(const TDesC &,const TVersion &)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TRequestStatus *)
RSessionBase::Open(RMessagePtr2,TInt,TOwnerType)
RSessionBase::Open(RMessagePtr2,TInt,const TSecurityPolicy &,TOwnerType)
RSessionBase::Open(TInt,TOwnerType)
RSessionBase::Open(TInt,const TSecurityPolicy &,TOwnerType)
RSessionBase::Send(TInt)const
RSessionBase::Send(TInt,const TIpcArgs &)const
RSessionBase::SendReceive(TInt,const TIpcArgs &)const
RSessionBase::SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const
RSessionBase::SetReturnedHandle(TInt)
RSessionBase::SetReturnedHandle(TInt,RHandleBase &)
RSessionBase::SetReturnedHandle(TInt,const TSecurityPolicy &)
RSessionBase::ShareAuto()
RSessionBase::ShareProtected()
Private Member Enumerations
enum TState {
EIdle  = 0, EInitializing , EInitialized , EPlaying , EPlayingBufferWait , ETonePlaying , ERecording , ERecordingBufferWait , ERecordingInLastBufferCycle , ERecordingResumingInLastBufferCycle
}
enum TTonePlayingMode { ESimple  = 0, EDual , EDTMFString , ESequence , EFixedSequence }
Inherited Enumerations
RHandleBase:TAttributes
RSessionBase:TAttachMode
Private Attributes
RMMFAudioServerProxy * iAudioServerProxy
CMMFDataBuffer * iBuffer
TMMFMessageDestinationPckg iCustIntPckg
TMMFMessageDestinationPckg iDestinationPckg
MDevSoundObserver * iDevSoundObserver
TMMFDevSoundProxySettingsPckg iDspsPckg
RMsgQueue < TMMFDevSoundQueueItem > iMsgQueue
CMsgQueueHandler * iMsgQueueHandler
HBufC * iSeqName
TState iState
TTonePlayingMode iToneMode
Inherited Attributes
RHandleBase::iHandle

Constructor & Destructor Documentation

RMMFDevSoundProxy()

IMPORT_C RMMFDevSoundProxy ( )
Constructor.
Since

Member Functions Documentation

AsyncCustomCommand(TUid, TRequestStatus &, const TDesC8 &, const TDesC8 &, TDes8 *)

IMPORT_C void AsyncCustomCommand ( TUid aUid,
TRequestStatus & aStatus,
const TDesC8 & aParam1,
const TDesC8 & aParam2,
TDes8 * aOutParam
)

Parameters

TUid aUid
TRequestStatus & aStatus
const TDesC8 & aParam1
const TDesC8 & aParam2
TDes8 * aOutParam

BufferToBeEmptied(CMMFBuffer *)

void BufferToBeEmptied ( CMMFBuffer * aBuffer )

Parameters

CMMFBuffer * aBuffer

BufferToBeEmptiedData(TMMFDevSoundProxyHwBufPckg &)

IMPORT_C TInt BufferToBeEmptiedData ( TMMFDevSoundProxyHwBufPckg & aSetPckg )
Returns data buffer from the DevSound server for recording.
Since

Parameters

TMMFDevSoundProxyHwBufPckg & aSetPckg

BufferToBeFilled(CMMFBuffer *)

void BufferToBeFilled ( CMMFBuffer * aBuffer )

Parameters

CMMFBuffer * aBuffer

BufferToBeFilledData(TBool, TMMFDevSoundProxyHwBufPckg &)

IMPORT_C TInt BufferToBeFilledData ( TBool aRequestChunk,
TMMFDevSoundProxyHwBufPckg & aSetPckg
)
Returns data buffer from the DevSound server for playback.
Since

Parameters

TBool aRequestChunk
TMMFDevSoundProxyHwBufPckg & aSetPckg

CancelInitialize()

IMPORT_C TInt CancelInitialize ( )

CancelRegisterAsClient(TUid)

IMPORT_C TInt CancelRegisterAsClient ( TUid aEventType )

Parameters

TUid aEventType

Capabilities()

IMPORT_C TMMFCapabilities Capabilities ( )
Returns the supported Audio settings ie. encoding, sample rates, mono/stereo operation, buffer size etc..
Since

Close()

IMPORT_C void Close ( )
Close the server session
Since

Config()

IMPORT_C TMMFCapabilities Config ( )
Returns the current device configuration.
Since

ConvertError(TInt)

void ConvertError ( TInt aError )

Parameters

TInt aError

CustomCommandAsync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TDes8 &, TRequestStatus &)

IMPORT_C void CustomCommandAsync ( const TMMFMessageDestinationPckg & aDestination,
TInt aFunction,
const TDesC8 & aDataTo1,
const TDesC8 & aDataTo2,
TDes8 & aDataFrom,
TRequestStatus & aStatus
)
Sends a custom command asynchronously to the DevSound server. Note: This method will return immediately. The RunL() of the active object owning the aStatus parameter will be called when the command is completed by the command handler.
Since

Parameters

const TMMFMessageDestinationPckg & aDestination
TInt aFunction
const TDesC8 & aDataTo1
const TDesC8 & aDataTo2
TDes8 & aDataFrom
TRequestStatus & aStatus

CustomCommandAsync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TRequestStatus &)

IMPORT_C void CustomCommandAsync ( const TMMFMessageDestinationPckg & aDestination,
TInt aFunction,
const TDesC8 & aDataTo1,
const TDesC8 & aDataTo2,
TRequestStatus & aStatus
)
Sends a custom command asynchronously to the DevSound server. Note: This method will return immediately. The RunL() of the active object owning the aStatus parameter will be called when the command is completed by the command handler.
Since

Parameters

const TMMFMessageDestinationPckg & aDestination
TInt aFunction
const TDesC8 & aDataTo1
const TDesC8 & aDataTo2
TRequestStatus & aStatus

CustomCommandSync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TDes8 &)

IMPORT_C TInt CustomCommandSync ( const TMMFMessageDestinationPckg & aDestination,
TInt aFunction,
const TDesC8 & aDataTo1,
const TDesC8 & aDataTo2,
TDes8 & aDataFrom
)
Sends a custom command synchronously to the DevSound server. This method will not return until the server has serviced the command.
Since

Parameters

const TMMFMessageDestinationPckg & aDestination
TInt aFunction
const TDesC8 & aDataTo1
const TDesC8 & aDataTo2
TDes8 & aDataFrom

CustomCommandSync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &)

IMPORT_C TInt CustomCommandSync ( const TMMFMessageDestinationPckg & aDestination,
TInt aFunction,
const TDesC8 & aDataTo1,
const TDesC8 & aDataTo2
)
Sends a custom command synchronously to the DevSound server. This method will not return until the server has serviced the command.
Since

Parameters

const TMMFMessageDestinationPckg & aDestination
TInt aFunction
const TDesC8 & aDataTo1
const TDesC8 & aDataTo2

CustomInterface(TUid)

IMPORT_C TAny * CustomInterface ( TUid aInterfaceId )
Retrieves a custom interface to the device.
Since

Parameters

TUid aInterfaceId

DeviceMessage(TUid, const TDesC8 &)

void DeviceMessage ( TUid aMessageType,
const TDesC8 & aMsg
)

Parameters

TUid aMessageType
const TDesC8 & aMsg

EmptyBuffers()

IMPORT_C TInt EmptyBuffers ( )

FixedSequenceCount()

IMPORT_C TInt FixedSequenceCount ( )
Returns the number of available pre-defined tone sequences. This is the number of fixed sequence supported by DevSound by default.
Since

FixedSequenceName(TInt)

IMPORT_C const TDesC & FixedSequenceName ( TInt aSequenceNumber )
Returns the name assigned to a specific pre-defined tone sequence. This is the number of the fixed sequence supported by DevSound by default. The function raises a panic if sequence number specified is invalid.
Since

Parameters

TInt aSequenceNumber

Gain()

IMPORT_C TInt Gain ( )
Returns an integer representing the current gain.
Since

GetPlayBalanceL(TInt &, TInt &)

IMPORT_C void GetPlayBalanceL ( TInt & aLeftPercentage,
TInt & aRightPercentage
)
Returns the speaker balance set for playing. Leaves on failure.
Since

Parameters

TInt & aLeftPercentage
TInt & aRightPercentage

GetRecordBalanceL(TInt &, TInt &)

IMPORT_C void GetRecordBalanceL ( TInt & aLeftPercentage,
TInt & aRightPercentage
)
Returns the microphone gain balance set for recording. Leaves on failure.
Since

Parameters

TInt & aLeftPercentage
TInt & aRightPercentage

GetResourceNotificationData(TUid, TDes8 &)

IMPORT_C TInt GetResourceNotificationData ( TUid aEventType,
TDes8 & aNotificationData
)

Parameters

TUid aEventType
TDes8 & aNotificationData

GetSupportedInputDataTypesL(RArray< TFourCC > &, const TMMFPrioritySettings &)

IMPORT_C void GetSupportedInputDataTypesL ( RArray < TFourCC > & aSupportedDataTypes,
const TMMFPrioritySettings & aPrioritySettings
)
Returns a list of the supported input datatypes that can be sent to DevSound for playing audio. The datatypes returned are those that the DevSound supports given the priority settings passed in aPrioritySettings. Note that if no supported data types are found this does not constitute failure, the function will return normally with no entries in aSupportedDataTypes.
Since

Parameters

RArray < TFourCC > & aSupportedDataTypes
const TMMFPrioritySettings & aPrioritySettings

GetSupportedOutputDataTypesL(RArray< TFourCC > &, const TMMFPrioritySettings &)

IMPORT_C void GetSupportedOutputDataTypesL ( RArray < TFourCC > & aSupportedDataTypes,
const TMMFPrioritySettings & aPrioritySettings
)
Returns a list of the supported output dataypes that can be received from DevSound for recording audio. The datatypes returned are those that the DevSound supports given the priority settings passed in aPrioritySettings. Note that if no supported data types are found this does not constitute failure, the function will return normally with no entries in aSupportedDataTypes.
Since

Parameters

RArray < TFourCC > & aSupportedDataTypes
const TMMFPrioritySettings & aPrioritySettings

GetTimePlayed(TTimeIntervalMicroSeconds &)

IMPORT_C TInt GetTimePlayed ( TTimeIntervalMicroSeconds & aTime )

Parameters

TTimeIntervalMicroSeconds & aTime

InitializeComplete(TInt)

void InitializeComplete ( TInt aError )

Parameters

TInt aError

InitializeL(MDevSoundObserver &, TMMFState, MMMFDevSoundCustomInterfaceObserver &)

IMPORT_C void InitializeL ( MDevSoundObserver & aDevSoundObserver,
TMMFState aMode,
MMMFDevSoundCustomInterfaceObserver & aDevSoundCIObserver
)
Initialize DevSound for the mode aMode. Leaves on failure.
Since

Parameters

MDevSoundObserver & aDevSoundObserver
TMMFState aMode
MMMFDevSoundCustomInterfaceObserver & aDevSoundCIObserver Observer which will receive Custom Interface events

InitializeL(MDevSoundObserver &, TUid, TMMFState, MMMFDevSoundCustomInterfaceObserver &)

IMPORT_C void InitializeL ( MDevSoundObserver & aDevSoundObserver,
TUid aHWDev,
TMMFState aMode,
MMMFDevSoundCustomInterfaceObserver & aDevSoundCIObserver
)
Initializes DevSound object for the mode aMode for processing audio data with hardware device aHWDev. Leaves on failure.
Since

Parameters

MDevSoundObserver & aDevSoundObserver
TUid aHWDev
TMMFState aMode
MMMFDevSoundCustomInterfaceObserver & aDevSoundCIObserver Observer which will receive Custom Interface events

InitializeL(MDevSoundObserver &, TFourCC, TMMFState, MMMFDevSoundCustomInterfaceObserver &)

IMPORT_C void InitializeL ( MDevSoundObserver & aDevSoundObserver,
TFourCC aDesiredFourCC,
TMMFState aMode,
MMMFDevSoundCustomInterfaceObserver & aDevSoundCIObserver
)
Initializes DevSound object for the mode aMode for processing audio data with hardware device supporting FourCC aDesiredFourCC. Leaves on failure.
Since

Parameters

MDevSoundObserver & aDevSoundObserver
TFourCC aDesiredFourCC
TMMFState aMode
MMMFDevSoundCustomInterfaceObserver & aDevSoundCIObserver Observer which will receive Custom Interface events

IsResumeSupported()

IMPORT_C TBool IsResumeSupported ( )
Queries if the low layers does support resume operation.
Since

MaxGain()

IMPORT_C TInt MaxGain ( )
Returns an integer representing the maximum gain the device supports. This is the maximum value which can be passed to CMMFDevSound::SetGain
Since

MaxVolume()

IMPORT_C TInt MaxVolume ( )
Returns an integer representing the maximum volume device supports. This is the maximum value which can be passed to CMMFDevSound::SetVolume .
Since

Open()

IMPORT_C TInt Open ( )
Open a DevSound server session
Since

Pause()

IMPORT_C void Pause ( )
Temporarily Stops the ongoing operation (Play, Record, TonePlay).
Since

PlayDTMFStringL(const TDesC &)

IMPORT_C void PlayDTMFStringL ( const TDesC & aDTMFString )
Initializes the audio device and starts playing the DTMF string aDTMFString. Leaves on failure.
Since

Parameters

const TDesC & aDTMFString

PlayData()

IMPORT_C void PlayData ( )

Plays data in the buffer at the current volume. The client should fill the buffer with audio data before calling this function. The observer gets a reference to the buffer along with the callback function BufferToBeFilled() . When playing of the audio sample is complete, successfully or otherwise, the function PlayError() on the observer is called. The last buffer of the audio stream being played should have the last buffer flag set using CMMFBuffer::SetLastBuffer(TBool) . If a subsequent attempt to play the clip is made, this flag will need resetting by the client.

PlayDualToneL(TInt, TInt, const TTimeIntervalMicroSeconds &)

IMPORT_C void PlayDualToneL ( TInt aFrequencyOne,
TInt aFrequencyTwo,
const TTimeIntervalMicroSeconds & aDuration
)
Initializes audio device and starts playing a dual tone. Dual Tone is played with the specified frequencies and for the specified duration. Leaves on failure.
Since

Parameters

TInt aFrequencyOne
TInt aFrequencyTwo
const TTimeIntervalMicroSeconds & aDuration

PlayError(TInt)

void PlayError ( TInt aError )

Parameters

TInt aError

PlayFixedSequenceL(TInt)

IMPORT_C void PlayFixedSequenceL ( TInt aSequenceNumber )
Initializes the audio device and starts playing the specified pre-defined tone sequence. Leaves on failure.
Since

Parameters

TInt aSequenceNumber

PlayInitL()

IMPORT_C void PlayInitL ( )
Initializes the audio device and starts the play process. This function queries and acquires the audio policy before initializing audio device. If there was an error during policy initialization, PlayError() function will be called on the observer with error code KErrAccessDenied, otherwise BufferToBeFilled() function will be called with a buffer reference. After reading data into the buffer reference passed, the client should call PlayData() to play data. The amount of data that can be played is specified in CMMFBuffer::RequestSize() . Any data that is read into buffer beyond this size will be ignored. Leaves on failure.
Since

PlayToneL(TInt, const TTimeIntervalMicroSeconds &)

IMPORT_C void PlayToneL ( TInt aFrequency,
const TTimeIntervalMicroSeconds & aDuration
)
Initializes the audio device and starts playing a tone. The tone is played with the frequency and duration specified. Leaves on failure.
Since

Parameters

TInt aFrequency
const TTimeIntervalMicroSeconds & aDuration

PlayToneSequenceL(const TDesC8 &)

IMPORT_C void PlayToneSequenceL ( const TDesC8 & aData )
Initializes the audio device and starts playing a tone sequence. Leaves on failure.
Since

Parameters

const TDesC8 & aData

PostOpen()

IMPORT_C TInt PostOpen ( )

Post open - called following successful open to complete open process. Allows async opening

RecordData()

IMPORT_C void RecordData ( )

Contine the process of recording. Once the buffer is filled with recorded data, the Observer gets a reference to the buffer along with the callback function BufferToBeEmptied() . After processing the buffer (copying over to a different buffer or writing to file) the client should call this function to continue the recording process.

RecordError(TInt)

void RecordError ( TInt aError )

Parameters

TInt aError

RecordInitL()

IMPORT_C void RecordInitL ( )
Initializes the audio device and starts the record process. This function queries and acquires the audio policy before initializing audio device. If there was an error during policy initialization, RecordError() function will be called on the observer with error code KErrAccessDenied, otherwise BufferToBeEmptied() function will be called with a buffer reference. This buffer contains recorded or encoded data. After processing data in the buffer reference passed, the client should call RecordData() to continue recording process. The amount of data that is available is specified in CMMFBuffer::RequestSize() . Leaves on failure.
Since

RegisterAsClient(TUid, const TDesC8 &)

IMPORT_C TInt RegisterAsClient ( TUid aEventType,
const TDesC8 & aNotificationRegistrationData =  KNullDesC8
)

Parameters

TUid aEventType
const TDesC8 & aNotificationRegistrationData =  KNullDesC8

Resume()

IMPORT_C TInt Resume ( )
Resume the operation (Play, Record, TonePlay) temporarily paused .
Since

SamplesPlayed()

IMPORT_C TInt SamplesPlayed ( )
Returns the number samples played so far.
Since

SamplesRecorded()

IMPORT_C TInt SamplesRecorded ( )
Returns the number samples recorded so far.
Since

SendEventToClient(const TMMFEvent &)

void SendEventToClient ( const TMMFEvent & aEvent )

Parameters

const TMMFEvent & aEvent

SetClientThreadInfo(TThreadId &)

IMPORT_C TInt SetClientThreadInfo ( TThreadId & aTid )

Parameters

TThreadId & aTid

SetConfigL(const TMMFCapabilities &)

IMPORT_C void SetConfigL ( const TMMFCapabilities & aConfig )
Configure CMMFDevSound object with the settings in aConfig. Use this to set sampling rate, encoding and mono/stereo. Leaves on failure.
Since

Parameters

const TMMFCapabilities & aConfig

SetDTMFLengths(TTimeIntervalMicroSeconds32 &, TTimeIntervalMicroSeconds32 &, TTimeIntervalMicroSeconds32 &)

IMPORT_C void SetDTMFLengths ( TTimeIntervalMicroSeconds32 & aToneOnLength,
TTimeIntervalMicroSeconds32 & aToneOffLength,
TTimeIntervalMicroSeconds32 & aPauseLength
)
Defines the duration of tone on, tone off and tone pause to be used during the DTMF tone playback operation. Supported only during tone playing.
Since

SetDevSoundInfo()

IMPORT_C TInt SetDevSoundInfo ( )
Launch DevSound instances that might have been waiting for audio policy.
Since

SetGain(TInt)

IMPORT_C TInt SetGain ( TInt aGain )
Changes the current recording gain to a specified value. The gain can be changed before or during recording and is effective immediately.
Since

Parameters

TInt aGain

SetPlayBalanceL(TInt, TInt)

IMPORT_C void SetPlayBalanceL ( TInt aLeftPercentage,
TInt aRightPercentage
)
Sets the speaker balance for playing. The speaker balance can be changed before or during playback and is effective immediately. Leaves on failure.
Since

Parameters

TInt aLeftPercentage
TInt aRightPercentage

SetPrioritySettings(const TMMFPrioritySettings &)

IMPORT_C void SetPrioritySettings ( const TMMFPrioritySettings & aPrioritySettings )
Defines the priority settings that should be used for this instance.
Since

Parameters

const TMMFPrioritySettings & aPrioritySettings

SetRecordBalanceL(TInt, TInt)

IMPORT_C void SetRecordBalanceL ( TInt aLeftPercentage,
TInt aRightPercentage
)
Sets the microphone balance for recording. The microphone balance can be changed before or during recording and is effective immediately. Leaves on failure.
Since

Parameters

TInt aLeftPercentage
TInt aRightPercentage

SetToneRepeats(TInt, const TTimeIntervalMicroSeconds &)

IMPORT_C void SetToneRepeats ( TInt aRepeatCount,
const TTimeIntervalMicroSeconds & aRepeatTrailingSilence
)
Defines the number of times the audio is to be repeated during the tone playback operation. A period of silence can follow each playing of a tone. The tone playing can be repeated indefinitely
Since

Parameters

TInt aRepeatCount
const TTimeIntervalMicroSeconds & aRepeatTrailingSilence

SetVolume(TInt)

IMPORT_C TInt SetVolume ( TInt aVolume )
Changes the current playback volume to a specified value. The volume can be changed before or during playback and is effective immediately
Since

Parameters

TInt aVolume

SetVolumeRamp(const TTimeIntervalMicroSeconds &)

IMPORT_C void SetVolumeRamp ( const TTimeIntervalMicroSeconds & aRampDuration )
Defines the period over which the volume level is to rise smoothly from nothing to the normal volume level. The function is only available before playing.
Since

Parameters

const TTimeIntervalMicroSeconds & aRampDuration

StartReceivingMsgQueueHandlerEventsL(MMMFDevSoundCustomInterfaceObserver &)

void StartReceivingMsgQueueHandlerEventsL ( MMMFDevSoundCustomInterfaceObserver & aDevSoundCIObserver ) [private]

Parameters

MMMFDevSoundCustomInterfaceObserver & aDevSoundCIObserver

Stop()

IMPORT_C void Stop ( )
Stops the ongoing operation (Play, Record, TonePlay).
Since

SyncCustomCommand(TUid, const TDesC8 &, const TDesC8 &, TDes8 *)

IMPORT_C TInt SyncCustomCommand ( TUid aUid,
const TDesC8 & aParam1,
const TDesC8 & aParam2,
TDes8 * aOutParam
)

Parameters

TUid aUid
const TDesC8 & aParam1
const TDesC8 & aParam2
TDes8 * aOutParam

ToneFinished(TInt)

void ToneFinished ( TInt aError )

Parameters

TInt aError

Volume()

IMPORT_C TInt Volume ( )
Returns an integer representing the current volume.
Since

WillResumePlay()

IMPORT_C TInt WillResumePlay ( )

Member Enumerations Documentation

Enum TState

Enumerators

EIdle = 0
EInitializing
EInitialized
EPlaying
EPlayingBufferWait
ETonePlaying
ERecording
ERecordingBufferWait
ERecordingInLastBufferCycle
ERecordingResumingInLastBufferCycle

Enum TTonePlayingMode

Enumerators

ESimple = 0
EDual
EDTMFString
ESequence
EFixedSequence

Member Data Documentation

RMMFAudioServerProxy * iAudioServerProxy

RMMFAudioServerProxy * iAudioServerProxy [private]

CMMFDataBuffer * iBuffer

CMMFDataBuffer * iBuffer [private]

TMMFMessageDestinationPckg iCustIntPckg

TMMFMessageDestinationPckg iCustIntPckg [private]

TMMFMessageDestinationPckg iDestinationPckg

TMMFMessageDestinationPckg iDestinationPckg [private]

MDevSoundObserver * iDevSoundObserver

MDevSoundObserver * iDevSoundObserver [private]

TMMFDevSoundProxySettingsPckg iDspsPckg

TMMFDevSoundProxySettingsPckg iDspsPckg [private]

RMsgQueue< TMMFDevSoundQueueItem > iMsgQueue

RMsgQueue < TMMFDevSoundQueueItem > iMsgQueue [private]

CMsgQueueHandler * iMsgQueueHandler

CMsgQueueHandler * iMsgQueueHandler [private]

HBufC * iSeqName

HBufC * iSeqName [private]

TState iState

TState iState [private]

TTonePlayingMode iToneMode

TTonePlayingMode iToneMode [private]