CMMFAudioInput Class Reference

class CMMFAudioInput : public CBase

Concrete data source to provide microphone support.

Intended to be used by controller plugin developers for source plugins. Uses CMMFDevSound to access hardware.

Inherits from

Public Member Functions
~CMMFAudioInput()
voidBufferEmptiedL(CMMFBuffer *)
TInt BytesPlayed()
TBool CanCreateSourceBuffer()
voidConstructL()
CMMFBuffer *CreateSourceBufferL(TMediaId)
CMMFBuffer *CreateSourceBufferL(TMediaId, CMMFBuffer &)
CMMFBuffer *CreateSourceBufferL(TMediaId, TBool &)
CMMFBuffer *CreateSourceBufferL(TMediaId, CMMFBuffer &, TBool &)
TFourCC DataType()
voidFillBufferL(CMMFBuffer *, MDataSink *, TMediaId)
voidHWFillBufferL(CMMFBuffer *, MDataSink *)
voidLoadL()
voidNegotiateSourceL(MDataSink &)
MDataSource *NewSourceL()
voidSetDataTypeL(TFourCC)
TInt SetSourceDataTypeCode(TFourCC, TMediaId)
voidSetSourcePrioritySettings(const TMMFPrioritySettings &)
CMMFDevSound &SoundDevice()
TFourCC SourceDataTypeCode(TMediaId)
voidSourcePauseL()
voidSourcePlayL()
voidSourcePrimeL()
voidSourceStopL()
voidSourceThreadLogoff()
TInt SourceThreadLogon(MAsyncEventHandler &)
Protected Member Functions
voidConstructSourceL(const TDesC8 &)
Private Member Functions
CMMFAudioInput()
voidBufferToBeEmptied(CMMFBuffer *)
voidBufferToBeFilled(CMMFBuffer *)
voidConfigDevSoundL()
voidConvertError(TInt)
voidDeviceMessage(TUid, const TDesC8 &)
voidInitializeComplete(TInt)
voidPlayError(TInt)
voidRecordError(TInt)
voidSendEventToClient(const TMMFEvent &)
voidToneFinished(TInt)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Member Enumerations
enumTCodec { EUseARMCodec = 0, EUseHWCodec }
enumTError { ECantCreateBuffer, EEmptyBuffer, EDevSoundNotLoaded, EUnknown }
enumTState { EIdle = 0, EPaused, EDevSoundReady, EBufferEmpty }
Public Attributes
TRequestStatus iBufferStatus
Private Attributes
CActiveSchedulerWait *iActiveSchedulerWait
MDataSink *iConsumer
TFourCC iDataTypeCode
CMMFBuffer *iDevSoundBuf
TBool iDevSoundLoaded
TError iError
MAsyncEventHandler *iEventHandler
TBool iFirstBufferRead
TBool iFirstBufferRequested
TInt iInitializeState
CMMFDevSound *iMMFDevSound
TInt iMMFDevsoundError
TBool iPausePending
TMMFPrioritySettings iPrioritySettings
TUint iSinkChannels
TFourCC iSinkFourCC
TUint iSinkSampleRate
TState iState
TBool iStopped

Constructor & Destructor Documentation

CMMFAudioInput()

CMMFAudioInput()[private, inline]

~CMMFAudioInput()

~CMMFAudioInput()[virtual]

Member Functions Documentation

BufferEmptiedL(CMMFBuffer *)

voidBufferEmptiedL(CMMFBuffer *aBuffer)[virtual]

Parameters

CMMFBuffer * aBuffer

BufferToBeEmptied(CMMFBuffer *)

voidBufferToBeEmptied(CMMFBuffer *aBuffer)[private, virtual]

Parameters

CMMFBuffer * aBuffer

BufferToBeFilled(CMMFBuffer *)

voidBufferToBeFilled(CMMFBuffer *aBuffer)[private, virtual]

Parameters

CMMFBuffer * aBuffer

BytesPlayed()

TInt BytesPlayed()

CanCreateSourceBuffer()

TBool CanCreateSourceBuffer()[virtual]

ConfigDevSoundL()

voidConfigDevSoundL()[private]

ConstructL()

voidConstructL()

ConstructSourceL(const TDesC8 &)

voidConstructSourceL(const TDesC8 &aInitData)[protected, virtual]

Parameters

const TDesC8 & aInitData

ConvertError(TInt)

voidConvertError(TIntaError)[private, virtual]

Parameters

TInt aError

CreateSourceBufferL(TMediaId)

CMMFBuffer *CreateSourceBufferL(TMediaIdaMediaId)[virtual]

Parameters

TMediaId aMediaId

CreateSourceBufferL(TMediaId, CMMFBuffer &)

CMMFBuffer *CreateSourceBufferL(TMediaIdaMediaId,
CMMFBuffer &aSinkBuffer
)[inline, virtual]

Intended for synchronous usage (returns buffer specific to a Media Type).

Parameters

TMediaId aMediaIdThe Media ID.
CMMFBuffer & aSinkBufferNot Used.

CreateSourceBufferL(TMediaId, TBool &)

CMMFBuffer *CreateSourceBufferL(TMediaIdaMediaId,
TBool &aReference
)[virtual]

Parameters

TMediaId aMediaId
TBool & aReference

CreateSourceBufferL(TMediaId, CMMFBuffer &, TBool &)

CMMFBuffer *CreateSourceBufferL(TMediaIdaMediaId,
CMMFBuffer &aSinkBuffer,
TBool &aReference
)[inline, virtual]

Creates a source buffer.

Intended for asynchronous usage (returns buffer specific to a Media Type).

Parameters

TMediaId aMediaIdThe Media ID.
CMMFBuffer & aSinkBufferNot used.
TBool & aReferenceA boolean indicating if MDataSource owns the buffer. If EFalse the the caller owns the buffer.

DataType()

TFourCC DataType()const [virtual]

DeviceMessage(TUid, const TDesC8 &)

voidDeviceMessage(TUidaMessageType,
const TDesC8 &aMsg
)[private, virtual]

Parameters

TUid aMessageType
const TDesC8 & aMsg

FillBufferL(CMMFBuffer *, MDataSink *, TMediaId)

voidFillBufferL(CMMFBuffer *aBuffer,
MDataSink *aConsumer,
TMediaIdaMediaId
)[virtual]

Parameters

CMMFBuffer * aBuffer
MDataSink * aConsumer
TMediaId aMediaId

HWFillBufferL(CMMFBuffer *, MDataSink *)

voidHWFillBufferL(CMMFBuffer *aBuffer,
MDataSink *aConsumer
)

Parameters

CMMFBuffer * aBuffer
MDataSink * aConsumer

InitializeComplete(TInt)

voidInitializeComplete(TIntaError)[private, virtual]

Parameters

TInt aError

LoadL()

voidLoadL()

NegotiateSourceL(MDataSink &)

voidNegotiateSourceL(MDataSink &aSink)[virtual]

Parameters

MDataSink & aSink

NewSourceL()

MDataSource *NewSourceL()[static]

PlayError(TInt)

voidPlayError(TIntaError)[private, virtual]

Parameters

TInt aError

RecordError(TInt)

voidRecordError(TIntaError)[private, virtual]

Parameters

TInt aError

SendEventToClient(const TMMFEvent &)

voidSendEventToClient(const TMMFEvent &)[private, virtual]

Parameters

const TMMFEvent &

SetDataTypeL(TFourCC)

voidSetDataTypeL(TFourCCaAudioType)[virtual]

Parameters

TFourCC aAudioType

SetSourceDataTypeCode(TFourCC, TMediaId)

TInt SetSourceDataTypeCode(TFourCCaSourceFourCC,
TMediaIdaMediaId
)[virtual]

Parameters

TFourCC aSourceFourCC
TMediaId aMediaId

SetSourcePrioritySettings(const TMMFPrioritySettings &)

voidSetSourcePrioritySettings(const TMMFPrioritySettings &aPrioritySettings)[virtual]

Parameters

const TMMFPrioritySettings & aPrioritySettings

SoundDevice()

CMMFDevSound &SoundDevice()

SourceDataTypeCode(TMediaId)

TFourCC SourceDataTypeCode(TMediaIdaMediaId)[virtual]

Parameters

TMediaId aMediaId

SourcePauseL()

voidSourcePauseL()[virtual]

SourcePlayL()

voidSourcePlayL()[virtual]

SourcePrimeL()

voidSourcePrimeL()[virtual]

SourceStopL()

voidSourceStopL()[virtual]

SourceThreadLogoff()

voidSourceThreadLogoff()[virtual]

SourceThreadLogon(MAsyncEventHandler &)

TInt SourceThreadLogon(MAsyncEventHandler &aEventHandler)[virtual]

Parameters

MAsyncEventHandler & aEventHandler

ToneFinished(TInt)

voidToneFinished(TIntaError)[private, virtual]

Parameters

TInt aError

Member Enumerations Documentation

Enum TCodec

Enumerators

EUseARMCodec = 0
EUseHWCodec

Enum TError

Enumerators

ECantCreateBuffer
EEmptyBuffer
EDevSoundNotLoaded
EUnknown

Enum TState

Enumerators

EIdle = 0
EPaused
EDevSoundReady
EBufferEmpty

Member Data Documentation

CActiveSchedulerWait * iActiveSchedulerWait

CActiveSchedulerWait *iActiveSchedulerWait[private]

TRequestStatus iBufferStatus

TRequestStatus iBufferStatus

Buffer completion status.

MDataSink * iConsumer

MDataSink *iConsumer[private]

TFourCC iDataTypeCode

TFourCC iDataTypeCode[private]

CMMFBuffer * iDevSoundBuf

CMMFBuffer *iDevSoundBuf[private]

TBool iDevSoundLoaded

TBool iDevSoundLoaded[private]

TError iError

TError iError[private]

MAsyncEventHandler * iEventHandler

MAsyncEventHandler *iEventHandler[private]

TBool iFirstBufferRead

TBool iFirstBufferRead[private]

TBool iFirstBufferRequested

TBool iFirstBufferRequested[private]

TInt iInitializeState

TInt iInitializeState[private]

CMMFDevSound * iMMFDevSound

CMMFDevSound *iMMFDevSound[private]

TInt iMMFDevsoundError

TInt iMMFDevsoundError[private]

TBool iPausePending

TBool iPausePending[private]

TMMFPrioritySettings iPrioritySettings

TMMFPrioritySettings iPrioritySettings[private]

TUint iSinkChannels

TUint iSinkChannels[private]

TFourCC iSinkFourCC

TFourCC iSinkFourCC[private]

TUint iSinkSampleRate

TUint iSinkSampleRate[private]

TState iState

TState iState[private]

TBool iStopped

TBool iStopped[private]