RMMFDevSoundProxy Class Reference

class RMMFDevSoundProxy : public RMmfSessionBase

Main interface to DevSound server.

MmfDevSoundProxy.lib
Since

Inherits from

Public Member Functions
RMMFDevSoundProxy()
IMPORT_C voidAsyncCustomCommand(TUid, TRequestStatus &, const TDesC8 &, const TDesC8 &, TDes8 *)
voidBufferToBeEmptied(CMMFBuffer *)
IMPORT_C TIntBufferToBeEmptiedData(TMMFDevSoundProxyHwBufPckg &)
voidBufferToBeFilled(CMMFBuffer *)
IMPORT_C TIntBufferToBeFilledData(TBool, TMMFDevSoundProxyHwBufPckg &)
IMPORT_C TIntCancelInitialize()
IMPORT_C TIntCancelRegisterAsClient(TUid)
IMPORT_C TMMFCapabilitiesCapabilities()
IMPORT_C voidClose()
IMPORT_C TMMFCapabilitiesConfig()
voidConvertError(TInt)
IMPORT_C voidCustomCommandAsync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TDes8 &, TRequestStatus &)
IMPORT_C voidCustomCommandAsync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TRequestStatus &)
IMPORT_C TIntCustomCommandSync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TDes8 &)
IMPORT_C TIntCustomCommandSync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &)
IMPORT_C TAny *CustomInterface(TUid)
voidDeviceMessage(TUid, const TDesC8 &)
IMPORT_C TIntEmptyBuffers()
IMPORT_C TIntFixedSequenceCount()
IMPORT_C const TDesC &FixedSequenceName(TInt)
IMPORT_C TIntGain()
IMPORT_C voidGetPlayBalanceL(TInt &, TInt &)
IMPORT_C voidGetRecordBalanceL(TInt &, TInt &)
IMPORT_C TIntGetResourceNotificationData(TUid, TDes8 &)
IMPORT_C voidGetSupportedInputDataTypesL(RArray< TFourCC > &, const TMMFPrioritySettings &)
IMPORT_C voidGetSupportedOutputDataTypesL(RArray< TFourCC > &, const TMMFPrioritySettings &)
IMPORT_C TIntGetTimePlayed(TTimeIntervalMicroSeconds &)
voidInitializeComplete(TInt)
IMPORT_C voidInitializeL(MDevSoundObserver &, TMMFState, MMMFDevSoundCustomInterfaceObserver &)
IMPORT_C voidInitializeL(MDevSoundObserver &, TUid, TMMFState, MMMFDevSoundCustomInterfaceObserver &)
IMPORT_C voidInitializeL(MDevSoundObserver &, TFourCC, TMMFState, MMMFDevSoundCustomInterfaceObserver &)
IMPORT_C TBoolIsResumeSupported()
IMPORT_C TIntMaxGain()
IMPORT_C TIntMaxVolume()
IMPORT_C TIntOpen()
IMPORT_C voidPause()
IMPORT_C voidPlayDTMFStringL(const TDesC &)
IMPORT_C voidPlayData()
IMPORT_C voidPlayDualToneL(TInt, TInt, const TTimeIntervalMicroSeconds &)
voidPlayError(TInt)
IMPORT_C voidPlayFixedSequenceL(TInt)
IMPORT_C voidPlayInitL()
IMPORT_C voidPlayToneL(TInt, const TTimeIntervalMicroSeconds &)
IMPORT_C voidPlayToneSequenceL(const TDesC8 &)
IMPORT_C TIntPostOpen()
IMPORT_C voidRecordData()
voidRecordError(TInt)
IMPORT_C voidRecordInitL()
IMPORT_C TIntRegisterAsClient(TUid, const TDesC8 &)
IMPORT_C TIntResume()
IMPORT_C TIntSamplesPlayed()
IMPORT_C TIntSamplesRecorded()
voidSendEventToClient(const TMMFEvent &)
IMPORT_C TIntSetClientThreadInfo(TThreadId &)
IMPORT_C voidSetConfigL(const TMMFCapabilities &)
IMPORT_C voidSetDTMFLengths(TTimeIntervalMicroSeconds32 &, TTimeIntervalMicroSeconds32 &, TTimeIntervalMicroSeconds32 &)
IMPORT_C TIntSetDevSoundInfo()
IMPORT_C TIntSetGain(TInt)
IMPORT_C voidSetPlayBalanceL(TInt, TInt)
IMPORT_C voidSetPrioritySettings(const TMMFPrioritySettings &)
IMPORT_C voidSetRecordBalanceL(TInt, TInt)
IMPORT_C voidSetToneRepeats(TInt, const TTimeIntervalMicroSeconds &)
IMPORT_C TIntSetVolume(TInt)
IMPORT_C voidSetVolumeRamp(const TTimeIntervalMicroSeconds &)
IMPORT_C voidStop()
IMPORT_C TIntSyncCustomCommand(TUid, const TDesC8 &, const TDesC8 &, TDes8 *)
voidToneFinished(TInt)
IMPORT_C TIntVolume()
IMPORT_C TIntWillResumePlay()
Private Member Functions
voidStartReceivingMsgQueueHandlerEventsL(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
enumTState {
EIdle = 0, EInitializing, EInitialized, EPlaying, EPlayingBufferWait, ETonePlaying, ERecording, ERecordingBufferWait, ERecordingInLastBufferCycle, ERecordingResumingInLastBufferCycle
}
enumTTonePlayingMode { 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_CRMMFDevSoundProxy()
Constructor.
Since

Member Functions Documentation

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

IMPORT_C voidAsyncCustomCommand(TUidaUid,
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 *)

voidBufferToBeEmptied(CMMFBuffer *aBuffer)

Parameters

CMMFBuffer * aBuffer

BufferToBeEmptiedData(TMMFDevSoundProxyHwBufPckg &)

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

Parameters

TMMFDevSoundProxyHwBufPckg & aSetPckg

BufferToBeFilled(CMMFBuffer *)

voidBufferToBeFilled(CMMFBuffer *aBuffer)

Parameters

CMMFBuffer * aBuffer

BufferToBeFilledData(TBool, TMMFDevSoundProxyHwBufPckg &)

IMPORT_C TIntBufferToBeFilledData(TBoolaRequestChunk,
TMMFDevSoundProxyHwBufPckg &aSetPckg
)
Returns data buffer from the DevSound server for playback.
Since

Parameters

TBool aRequestChunk
TMMFDevSoundProxyHwBufPckg & aSetPckg

CancelInitialize()

IMPORT_C TIntCancelInitialize()

CancelRegisterAsClient(TUid)

IMPORT_C TIntCancelRegisterAsClient(TUidaEventType)

Parameters

TUid aEventType

Capabilities()

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

Close()

IMPORT_C voidClose()
Close the server session
Since

Config()

IMPORT_C TMMFCapabilitiesConfig()
Returns the current device configuration.
Since

ConvertError(TInt)

voidConvertError(TIntaError)

Parameters

TInt aError

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

IMPORT_C voidCustomCommandAsync(const TMMFMessageDestinationPckg &aDestination,
TIntaFunction,
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 voidCustomCommandAsync(const TMMFMessageDestinationPckg &aDestination,
TIntaFunction,
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 TIntCustomCommandSync(const TMMFMessageDestinationPckg &aDestination,
TIntaFunction,
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 TIntCustomCommandSync(const TMMFMessageDestinationPckg &aDestination,
TIntaFunction,
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(TUidaInterfaceId)
Retrieves a custom interface to the device.
Since

Parameters

TUid aInterfaceId

DeviceMessage(TUid, const TDesC8 &)

voidDeviceMessage(TUidaMessageType,
const TDesC8 &aMsg
)

Parameters

TUid aMessageType
const TDesC8 & aMsg

EmptyBuffers()

IMPORT_C TIntEmptyBuffers()

FixedSequenceCount()

IMPORT_C TIntFixedSequenceCount()
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(TIntaSequenceNumber)
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 TIntGain()
Returns an integer representing the current gain.
Since

GetPlayBalanceL(TInt &, TInt &)

IMPORT_C voidGetPlayBalanceL(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 voidGetRecordBalanceL(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 TIntGetResourceNotificationData(TUidaEventType,
TDes8 &aNotificationData
)

Parameters

TUid aEventType
TDes8 & aNotificationData

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

IMPORT_C voidGetSupportedInputDataTypesL(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 voidGetSupportedOutputDataTypesL(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 TIntGetTimePlayed(TTimeIntervalMicroSeconds &aTime)

Parameters

TTimeIntervalMicroSeconds & aTime

InitializeComplete(TInt)

voidInitializeComplete(TIntaError)

Parameters

TInt aError

InitializeL(MDevSoundObserver &, TMMFState, MMMFDevSoundCustomInterfaceObserver &)

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

Parameters

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

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

IMPORT_C voidInitializeL(MDevSoundObserver &aDevSoundObserver,
TUidaHWDev,
TMMFStateaMode,
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 & aDevSoundCIObserverObserver which will receive Custom Interface events

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

IMPORT_C voidInitializeL(MDevSoundObserver &aDevSoundObserver,
TFourCCaDesiredFourCC,
TMMFStateaMode,
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 & aDevSoundCIObserverObserver which will receive Custom Interface events

IsResumeSupported()

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

MaxGain()

IMPORT_C TIntMaxGain()
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 TIntMaxVolume()
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 TIntOpen()
Open a DevSound server session
Since

Pause()

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

PlayDTMFStringL(const TDesC &)

IMPORT_C voidPlayDTMFStringL(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 voidPlayData()

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 voidPlayDualToneL(TIntaFrequencyOne,
TIntaFrequencyTwo,
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)

voidPlayError(TIntaError)

Parameters

TInt aError

PlayFixedSequenceL(TInt)

IMPORT_C voidPlayFixedSequenceL(TIntaSequenceNumber)
Initializes the audio device and starts playing the specified pre-defined tone sequence. Leaves on failure.
Since

Parameters

TInt aSequenceNumber

PlayInitL()

IMPORT_C voidPlayInitL()
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 voidPlayToneL(TIntaFrequency,
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 voidPlayToneSequenceL(const TDesC8 &aData)
Initializes the audio device and starts playing a tone sequence. Leaves on failure.
Since

Parameters

const TDesC8 & aData

PostOpen()

IMPORT_C TIntPostOpen()

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

RecordData()

IMPORT_C voidRecordData()

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)

voidRecordError(TIntaError)

Parameters

TInt aError

RecordInitL()

IMPORT_C voidRecordInitL()
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 TIntRegisterAsClient(TUidaEventType,
const TDesC8 &aNotificationRegistrationData =  KNullDesC8
)

Parameters

TUid aEventType
const TDesC8 & aNotificationRegistrationData =  KNullDesC8

Resume()

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

SamplesPlayed()

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

SamplesRecorded()

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

SendEventToClient(const TMMFEvent &)

voidSendEventToClient(const TMMFEvent &aEvent)

Parameters

const TMMFEvent & aEvent

SetClientThreadInfo(TThreadId &)

IMPORT_C TIntSetClientThreadInfo(TThreadId &aTid)

Parameters

TThreadId & aTid

SetConfigL(const TMMFCapabilities &)

IMPORT_C voidSetConfigL(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 voidSetDTMFLengths(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

Parameters

TTimeIntervalMicroSeconds32 & aToneOnLength
TTimeIntervalMicroSeconds32 & aToneOffLength
TTimeIntervalMicroSeconds32 & aPauseLength

SetDevSoundInfo()

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

SetGain(TInt)

IMPORT_C TIntSetGain(TIntaGain)
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 voidSetPlayBalanceL(TIntaLeftPercentage,
TIntaRightPercentage
)
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 voidSetPrioritySettings(const TMMFPrioritySettings &aPrioritySettings)
Defines the priority settings that should be used for this instance.
Since

Parameters

const TMMFPrioritySettings & aPrioritySettings

SetRecordBalanceL(TInt, TInt)

IMPORT_C voidSetRecordBalanceL(TIntaLeftPercentage,
TIntaRightPercentage
)
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 voidSetToneRepeats(TIntaRepeatCount,
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 TIntSetVolume(TIntaVolume)
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 voidSetVolumeRamp(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 &)

voidStartReceivingMsgQueueHandlerEventsL(MMMFDevSoundCustomInterfaceObserver &aDevSoundCIObserver)[private]

Parameters

MMMFDevSoundCustomInterfaceObserver & aDevSoundCIObserver

Stop()

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

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

IMPORT_C TIntSyncCustomCommand(TUidaUid,
const TDesC8 &aParam1,
const TDesC8 &aParam2,
TDes8 *aOutParam
)

Parameters

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

ToneFinished(TInt)

voidToneFinished(TIntaError)

Parameters

TInt aError

Volume()

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

WillResumePlay()

IMPORT_C TIntWillResumePlay()

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]