Symbian
 Developer Library

UIQ 3 SDK

UIQ developer portal

FEEDBACK 

[Index] [Spacer] [Previous] [Next]



Location: mmf\server\MmfAudioinput.h
Link against: mmfaudioinput.lib

Class CMMFAudioInput

class CMMFAudioInput : public CBase, public MMMFAudioInput, public MDevSoundObserver;

Description

Concrete data source to provide microphone support.

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

Derivation

Members

Defined in CMMFAudioInput:
BufferEmptiedL(), BytesPlayed(), CanCreateSourceBuffer(), ConstructSourceL(), CreateSourceBufferL(), CreateSourceBufferL(), CreateSourceBufferL(), CreateSourceBufferL(), DataType(), FillBufferL(), HWFillBufferL(), NegotiateSourceL(), SetDataTypeL(), SetSourceDataTypeCode(), SetSourcePrioritySettings(), SoundDevice(), SourceDataTypeCode(), SourcePauseL(), SourcePlayL(), SourcePrimeL(), SourceStopL(), SourceThreadLogoff(), SourceThreadLogon(), iBufferStatus, ~CMMFAudioInput()

Inherited from CBase:
Delete(), Extension_(), operator new()

Inherited from MDataSource:
DataSourceType(), NewSourceL(), SourceCustomCommand(), SourceSampleConvert()

Inherited from MDevSoundObserver:
BufferToBeEmptied(), BufferToBeFilled(), ConvertError(), DeviceMessage(), InitializeComplete(), PlayError(), RecordError(), SendEventToClient(), ToneFinished()

Inherited from MMMFAudioInput:
NewAudioInputL()


Construction and destruction


~CMMFAudioInput()

virtual ~CMMFAudioInput();

Description

Standard SymbianOS destructor.

[Top]


Member functions


SourceDataTypeCode()

virtual TFourCC SourceDataTypeCode(TMediaId aMediaId);

Description

Gets the data type code for the source specified by the media ID.

Parameters

TMediaId aMediaId

An optional parameter to specifiy a specific stream when the datasource contains more than one stream of data.

Return value

TFourCC

The 4CC of the data supplied by this source.


FillBufferL()

virtual void FillBufferL(CMMFBuffer *aBuffer, MDataSink *aConsumer, TMediaId aMediaId);

Pre-Condition

iMMFDevSound must be loaded.

Description

Gets audio from MMFDevsound.

Parameters

CMMFBuffer *aBuffer

The data to read in from a Devsound device.

MDataSink *aConsumer

The MDataSink consuming the data contained in aBuffer.

TMediaId aMediaId

Type of data supplied - currently ignored.


BufferEmptiedL()

virtual void BufferEmptiedL(CMMFBuffer *aBuffer);

Description

Indicates the data sink has emptied the buffer.

Called by the data path's MDataSink when it has emptied the buffer.

The default implementation is empty.

Parameters

CMMFBuffer *aBuffer

The data buffer that has been emptied (not used).


CanCreateSourceBuffer()

virtual TBool CanCreateSourceBuffer();

Description

Tests whether a source buffer can be created.

The default imlpementation returns true.

Return value

TBool

A boolean indicating if the buffer can be made. ETrue if the buffer can be created, false otherwise.


CreateSourceBufferL()

virtual CMMFBuffer *CreateSourceBufferL(TMediaId aMediaId);

Description

Creates a source buffer.

Intended for synchronous usage.

Parameters

TMediaId aMediaId

The Media ID. Not used in the default implementation.

Return value

CMMFBuffer *

The buffer created


CreateSourceBufferL()

inline virtual CMMFBuffer *CreateSourceBufferL(TMediaId aMediaId, CMMFBuffer &aSinkBuffer);

Description

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

Parameters

TMediaId aMediaId

The Media ID.

CMMFBuffer &aSinkBuffer

Not Used.

Return value

CMMFBuffer *

A pointer to the CMMFBuffer source buffer.


CreateSourceBufferL()

virtual CMMFBuffer *CreateSourceBufferL(TMediaId aMediaId, TBool &aReference);

Description

Creates a source buffer.

Intended for asynchronous usage (buffers supplied by Devsound device)

Parameters

TMediaId aMediaId

The Media ID. Not used in the default implementation.

TBool &aReference

A boolean indicating if MDataSource owns the buffer. ETrue if it does, EFalse if it does not.

Return value

CMMFBuffer *

The buffer created (this will always be NULL when asychronous).


CreateSourceBufferL()

inline virtual CMMFBuffer *CreateSourceBufferL(TMediaId aMediaId, CMMFBuffer &aSinkBuffer, TBool &aReference);

Description

Creates a source buffer.

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

Parameters

TMediaId aMediaId

The Media ID.

CMMFBuffer &aSinkBuffer

Not used.

TBool &aReference

A boolean indicating if MDataSource owns the buffer. If EFalse the the caller owns the buffer.

Return value

CMMFBuffer *

The source buffer.


SourceThreadLogon()

virtual TInt SourceThreadLogon(MAsyncEventHandler &aEventHandler);

Description

Logs on the source thread.

Thread specific initialization procedure for this device. Runs automatically on thread construction.

Parameters

MAsyncEventHandler &aEventHandler

The event handler.

Return value

TInt

An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.


SourceThreadLogoff()

virtual void SourceThreadLogoff();

Description

Logs off the source thread.

Thread specific destruction procedure for this device. Runs automatically on thread destruction.


SourcePrimeL()

virtual void SourcePrimeL();

Description

Primes the source.

This is a virtual function that each derived class must implement, but may be left blank for default behaviour.

Overridable PrimeL method. Additional Prime method specific to this DataSource.


SourceStopL()

virtual void SourceStopL();

Description

Stops the source.

This is a virtual function that each derived class must implement, but may be left blank for default behaviour.

Overridable StopL method. Additional Stop method specific to this DataSource.


SourcePlayL()

virtual void SourcePlayL();

Description

Plays the source.

This is a virtual function that each derived class must implement, but may be left blank for default behaviour.

Overridable PlayL method. Additional Play method specific to this DataSource.


SourcePauseL()

virtual void SourcePauseL();

Description

Pauses the source.

This is a virtual function that each derived class must implement, but may be left blank for default behaviour.

Overridable PauseL method. Additional Pause method specific to this DataSource.


SetSourcePrioritySettings()

virtual void SetSourcePrioritySettings(const TMMFPrioritySettings &aPrioritySettings);

Description

Sets the source's priority settings.

Parameters

const TMMFPrioritySettings &aPrioritySettings

The source priority settings. Takes enumerations to determine audio record priority. Higher numbers mean high priority (can interrupt lower priorities).


NegotiateSourceL()

virtual void NegotiateSourceL(MDataSink &aSink);

Description

Negotiates with the sink.

Called if the source's setup depends on sink.

Parameters

MDataSink &aSink

The Data sink. Takes an MDataSink reference so a DataSource can negotiate with this MDataSource.


BytesPlayed()

virtual TInt BytesPlayed();

Description

Gets the number of bytes played.

Return value

TInt

The number of bytes played. If 16-bit divide this number returned by 2 to get word length.


HWFillBufferL()

Interface status: deprecated

virtual void HWFillBufferL(CMMFBuffer *aBuffer, MDataSink *aConsumer);

Description

Gets audio from hardware device abstracted MMFDevsound (not used).

Parameters

CMMFBuffer *aBuffer

The data to read in from a Hardware Device

MDataSink *aConsumer

The MDataSink consuming the data contained in aBuffer.


SoundDevice()

virtual CMMFDevSound &SoundDevice();

Pre-Condition

Dev Sound should be loaded.

Description

Returns the sound device.

Accessor function exposing public CMMFDevsound methods.

Return value

CMMFDevSound &

A reference to a CMMFDevSound objector.


SetSourceDataTypeCode()

virtual TInt SetSourceDataTypeCode(TFourCC aSourceFourCC, TMediaId aMediaId);

Description

Sets the data type code for the source.

Parameters

TFourCC aSourceFourCC

The 4CC of the data supplied by this source.

TMediaId aMediaId

The Media ID. An optional parameter to specifiy specific stream when datasource contains more than one stream of data.

Return value

TInt

An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.


SetDataTypeL()

Interface status: deprecated

virtual void SetDataTypeL(TFourCC aAudioType);

Description

This method should not be used - it is provided to maintain SC with v7.0s.

Parameters

TFourCC aAudioType

The 4CC of the data supplied by this source.


DataType()

Interface status: deprecated

virtual TFourCC DataType() const;

Description

This method should not be used - it is provided to maintain SC with v7.0s.

Return value

TFourCC

The 4CC of the data supplied by this source.


ConstructSourceL()

protected: virtual void ConstructSourceL(const TDesC8 &aInitData);

Description

Overridable constuctor specific to this datasource.

Parameters

const TDesC8 &aInitData

The initialisation data.

[Top]


Member data


iBufferStatus

TRequestStatus iBufferStatus;

Description

Buffer completion status.

Terms and conditions of use of the material