CMMFMdaAudioOutputStream Class Reference

class CMMFMdaAudioOutputStream : public CBase

Inherits from

Nested Classes and Structures

Public Member Functions
~CMMFMdaAudioOutputStream ()
void BufferToBeEmptied ( CMMFBuffer *)
void BufferToBeFilled ( CMMFBuffer *)
TInt CancelRegisterAudioResourceNotification ( TUid )
void ConvertError ( TInt )
TAny * CustomInterface ( TUid )
TFourCC DataType ()
void DeviceMessage ( TUid , const TDesC8 &)
TInt GetBalanceL ()
TInt GetBytes ()
void InitializeComplete ( TInt )
TInt KeepOpenAtEnd ()
TInt MaxVolume ()
CMMFMdaAudioOutputStream * NewL ( MMdaAudioOutputStreamCallback &)
CMMFMdaAudioOutputStream * NewL ( MMdaAudioOutputStreamCallback &, TInt , TInt )
void Open ( TMdaPackage *)
TInt Pause ()
void PlayError ( TInt )
const TTimeIntervalMicroSeconds & Position ()
void RecordError ( TInt )
TInt RegisterAudioResourceNotification ( MMMFAudioResourceNotificationCallback &, TUid , const TDesC8 &)
TInt RequestStop ()
TInt Resume ()
void SendEventToClient (const TMMFEvent &)
void SetAudioPropertiesL ( TInt , TInt )
void SetBalanceL ( TInt )
void SetDataTypeL ( TFourCC )
void SetPriority ( TInt , TInt )
void SetVolume (const TInt )
void Stop ()
void ToneFinished ( TInt )
TInt Volume ()
TInt WillResumePlay ()
void WriteL (const TDesC8 &)
Private Member Functions
CMMFMdaAudioOutputStream ( MMdaAudioOutputStreamCallback &)
void ConstructL ( TInt , TInt )
void DoShutDownTimerComplete ()
void EmptyFifo ( TInt )
void RealSetAudioPropertiesL ( TInt , TInt )
TInt ShutDownTimerComplete ( TAny *)
void StartPlayL ()
void StartShutDownTimer ()
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
enum TIsOpenState { EIsNotOpen , EIsOpening , EIsOpen }
enum TState { EStopped , EPlaying , EStopping , EPaused }
Private Attributes
CActiveCallback * iActiveCallback
CActiveSchedulerWait * iActiveSchedulerWait
MMMFAudioResourceNotificationCallback * iAudioResourceNotificationCallBack
CMMFBuffer * iBuffer
MMdaAudioOutputStreamCallback & iCallback
TInt iChannels
TInt iCurrentSamplesPlayed
TFourCC iDataTypeCode
CMMFDevSound * iDevSound
TBool iDevSoundIgnoresUnderflow
TUid iEventHolder
CMMFFifo < const TDesC8 > * iFifo
TInt iFifoItemPos
TBool iInitCallFrmSetDataType
TInt iInitializeState
TIsOpenState iIsOpenState
TBool iKeepOpenAtEnd
TBuf8 < 256 > iNotificationDataHolder
TTimeIntervalMicroSeconds iPosition
TInt iSampleRate
CPeriodic * iShutDownTimer
TState iState
TBool iValuesCached
TInt iVolume

Constructor & Destructor Documentation

CMMFMdaAudioOutputStream(MMdaAudioOutputStreamCallback &)

CMMFMdaAudioOutputStream ( MMdaAudioOutputStreamCallback & aCallback ) [private]

Construct

Parameters

MMdaAudioOutputStreamCallback & aCallback

~CMMFMdaAudioOutputStream()

~CMMFMdaAudioOutputStream ( ) [virtual]

Destructor

Member Functions Documentation

BufferToBeEmptied(CMMFBuffer *)

void BufferToBeEmptied ( CMMFBuffer * aBuffer ) [virtual]

Do not support

Parameters

CMMFBuffer * aBuffer

BufferToBeFilled(CMMFBuffer *)

void BufferToBeFilled ( CMMFBuffer * aBuffer ) [virtual]

Called when sound device need data

Parameters

CMMFBuffer * aBuffer

CancelRegisterAudioResourceNotification(TUid)

TInt CancelRegisterAudioResourceNotification ( TUid aNotificationEventId )

Parameters

TUid aNotificationEventId

ConstructL(TInt, TInt)

void ConstructL ( TInt aPriority,
TInt aPref
) [private]

Second phase constructor

Parameters

TInt aPriority
TInt aPref

ConvertError(TInt)

void ConvertError ( TInt aError ) [virtual]

Do not support

Parameters

TInt aError

CustomInterface(TUid)

TAny * CustomInterface ( TUid aInterfaceId )

Parameters

TUid aInterfaceId

DataType()

TFourCC DataType ( ) const

DeviceMessage(TUid, const TDesC8 &)

void DeviceMessage ( TUid aMessageType,
const TDesC8 & aMsg
) [virtual]

Do not support

Parameters

TUid aMessageType
const TDesC8 & aMsg

DoShutDownTimerComplete()

void DoShutDownTimerComplete ( ) [private]

EmptyFifo(TInt)

void EmptyFifo ( TInt aError ) [private]

Parameters

TInt aError

GetBalanceL()

TInt GetBalanceL ( ) const

To get the current balance value. This function may not return the same value as passed to SetBalanceL depending on the internal implementation in the underlying components.

GetBytes()

TInt GetBytes ( )

To return the current number of bytes rendered by audio hardware

InitializeComplete(TInt)

void InitializeComplete ( TInt aError ) [virtual]

To be called when intialize stream complete

Parameters

TInt aError

KeepOpenAtEnd()

TInt KeepOpenAtEnd ( )

MaxVolume()

TInt MaxVolume ( )

To get the maximum volume level

NewL(MMdaAudioOutputStreamCallback &)

CMMFMdaAudioOutputStream * NewL ( MMdaAudioOutputStreamCallback & aCallback ) [static]

2 phase construction function

Parameters

MMdaAudioOutputStreamCallback & aCallback

NewL(MMdaAudioOutputStreamCallback &, TInt, TInt)

CMMFMdaAudioOutputStream * NewL ( MMdaAudioOutputStreamCallback & aCallback,
TInt aPriority,
TInt aPref
) [static]

Parameters

MMdaAudioOutputStreamCallback & aCallback
TInt aPriority
TInt aPref

Open(TMdaPackage *)

void Open ( TMdaPackage * aSettings )

Open a audio ouptut stream

Parameters

TMdaPackage * aSettings

Pause()

TInt Pause ( )

To pause send data to stream

PlayError(TInt)

void PlayError ( TInt aError ) [virtual]

Called when play operation complete, successfully or otherwise

Parameters

TInt aError

Position()

const TTimeIntervalMicroSeconds & Position ( )

To get the current position in the data stream

RealSetAudioPropertiesL(TInt, TInt)

void RealSetAudioPropertiesL ( TInt aSampleRate,
TInt aChannels
) [private]

Parameters

TInt aSampleRate
TInt aChannels

RecordError(TInt)

void RecordError ( TInt aError ) [virtual]

Do not support

Parameters

TInt aError

RegisterAudioResourceNotification(MMMFAudioResourceNotificationCallback &, TUid, const TDesC8 &)

TInt RegisterAudioResourceNotification ( MMMFAudioResourceNotificationCallback & aCallback,
TUid aNotificationEventUid,
const TDesC8 & aNotificationRegistrationData =  KNullDesC8
)

Parameters

MMMFAudioResourceNotificationCallback & aCallback
TUid aNotificationEventUid
const TDesC8 & aNotificationRegistrationData =  KNullDesC8

RequestStop()

TInt RequestStop ( )

Resume()

TInt Resume ( )

To resume send data to stream

SendEventToClient(const TMMFEvent &)

void SendEventToClient ( const TMMFEvent & aEvent ) [virtual]

Parameters

const TMMFEvent & aEvent

SetAudioPropertiesL(TInt, TInt)

void SetAudioPropertiesL ( TInt aSampleRate,
TInt aChannels
)

Set audio output stream properties

Parameters

TInt aSampleRate
TInt aChannels

SetBalanceL(TInt)

void SetBalanceL ( TInt aBalance =  KMMFBalanceCenter )

Set audio output stream balance

Parameters

TInt aBalance =  KMMFBalanceCenter

SetDataTypeL(TFourCC)

void SetDataTypeL ( TFourCC aAudioType )

Parameters

TFourCC aAudioType

SetPriority(TInt, TInt)

void SetPriority ( TInt aPriority,
TInt aPref
)

Set audio output stream priority

Parameters

TInt aPriority
TInt aPref

SetVolume(const TInt)

void SetVolume ( const TInt aVolume )

Set audio output stream volume to the specified value

Parameters

const TInt aVolume

ShutDownTimerComplete(TAny *)

TInt ShutDownTimerComplete ( TAny * aSamplesPlayed ) [private, static]

Parameters

TAny * aSamplesPlayed

StartPlayL()

void StartPlayL ( ) [private]

If the audio stream is stopped, then notify the CDevSound to initilised play. The CDevSound will automatically start calling back for buffers.

StartShutDownTimer()

void StartShutDownTimer ( ) [private]

Stop()

void Stop ( )

To stop write data to stream

ToneFinished(TInt)

void ToneFinished ( TInt aError ) [virtual]

Do not support

Parameters

TInt aError

Volume()

TInt Volume ( )

To get the current volume level

WillResumePlay()

TInt WillResumePlay ( )

WriteL(const TDesC8 &)

void WriteL ( const TDesC8 & aData )

To write data to output stream Note that if framed data eg gsm610 is being streamed then the buffer size of aData should contain an intiger number of frames

Parameters

const TDesC8 & aData

Member Enumerations Documentation

Enum TIsOpenState

Enumerators

EIsNotOpen
EIsOpening
EIsOpen

Enum TState

Enumerators

EStopped
EPlaying
EStopping
EPaused

Member Data Documentation

CActiveCallback * iActiveCallback

CActiveCallback * iActiveCallback [private]

CActiveSchedulerWait * iActiveSchedulerWait

CActiveSchedulerWait * iActiveSchedulerWait [private]

MMMFAudioResourceNotificationCallback * iAudioResourceNotificationCallBack

MMMFAudioResourceNotificationCallback * iAudioResourceNotificationCallBack [private]

CMMFBuffer * iBuffer

CMMFBuffer * iBuffer [private]

MMdaAudioOutputStreamCallback & iCallback

MMdaAudioOutputStreamCallback & iCallback [private]

TInt iChannels

TInt iChannels [private]

TInt iCurrentSamplesPlayed

TInt iCurrentSamplesPlayed [private]

TFourCC iDataTypeCode

TFourCC iDataTypeCode [private]

CMMFDevSound * iDevSound

CMMFDevSound * iDevSound [private]

TBool iDevSoundIgnoresUnderflow

TBool iDevSoundIgnoresUnderflow [private]

TUid iEventHolder

TUid iEventHolder [private]

CMMFFifo< const TDesC8 > * iFifo

CMMFFifo < const TDesC8 > * iFifo [private]

TInt iFifoItemPos

TInt iFifoItemPos [private]

TBool iInitCallFrmSetDataType

TBool iInitCallFrmSetDataType [private]

TInt iInitializeState

TInt iInitializeState [private]

TIsOpenState iIsOpenState

TIsOpenState iIsOpenState [private]

TBool iKeepOpenAtEnd

TBool iKeepOpenAtEnd [private]

TBuf8< 256 > iNotificationDataHolder

TBuf8 < 256 > iNotificationDataHolder [private]

TTimeIntervalMicroSeconds iPosition

TTimeIntervalMicroSeconds iPosition [private]

TInt iSampleRate

TInt iSampleRate [private]

CPeriodic * iShutDownTimer

CPeriodic * iShutDownTimer [private]

TState iState

TState iState [private]

TBool iValuesCached

TBool iValuesCached [private]

TInt iVolume

TInt iVolume [private]