CMMFMdaAudioOutputStream Class Reference

class CMMFMdaAudioOutputStream : public CBase

Inherits from

  • CMMFMdaAudioOutputStream

Nested Classes and Structures

Public Member Functions
~CMMFMdaAudioOutputStream()
voidBufferToBeEmptied(CMMFBuffer *)
voidBufferToBeFilled(CMMFBuffer *)
TInt CancelRegisterAudioResourceNotification(TUid)
voidConvertError(TInt)
TAny *CustomInterface(TUid)
TFourCC DataType()
voidDeviceMessage(TUid, const TDesC8 &)
TInt GetBalanceL()
TInt GetBytes()
voidInitializeComplete(TInt)
TInt KeepOpenAtEnd()
TInt MaxVolume()
CMMFMdaAudioOutputStream *NewL(MMdaAudioOutputStreamCallback &)
CMMFMdaAudioOutputStream *NewL(MMdaAudioOutputStreamCallback &, TInt, TInt)
voidOpen(TMdaPackage *)
TInt Pause()
voidPlayError(TInt)
const TTimeIntervalMicroSeconds &Position()
voidRecordError(TInt)
TInt RegisterAudioResourceNotification(MMMFAudioResourceNotificationCallback &, TUid, const TDesC8 &)
TInt RequestStop()
TInt Resume()
voidSendEventToClient(const TMMFEvent &)
voidSetAudioPropertiesL(TInt, TInt)
voidSetBalanceL(TInt)
voidSetDataTypeL(TFourCC)
voidSetPriority(TInt, TInt)
voidSetVolume(const TInt)
voidStop()
voidToneFinished(TInt)
TInt Volume()
TInt WillResumePlay()
voidWriteL(const TDesC8 &)
Private Member Functions
CMMFMdaAudioOutputStream(MMdaAudioOutputStreamCallback &)
voidConstructL(TInt, TInt)
voidDoShutDownTimerComplete()
voidEmptyFifo(TInt)
voidRealSetAudioPropertiesL(TInt, TInt)
TInt ShutDownTimerComplete(TAny *)
voidStartPlayL()
voidStartShutDownTimer()
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
enumTIsOpenState { EIsNotOpen, EIsOpening, EIsOpen }
enumTState { 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 *)

voidBufferToBeEmptied(CMMFBuffer *aBuffer)[virtual]

Do not support

Parameters

CMMFBuffer * aBuffer

BufferToBeFilled(CMMFBuffer *)

voidBufferToBeFilled(CMMFBuffer *aBuffer)[virtual]

Called when sound device need data

Parameters

CMMFBuffer * aBuffer

CancelRegisterAudioResourceNotification(TUid)

TInt CancelRegisterAudioResourceNotification(TUidaNotificationEventId)

Parameters

TUid aNotificationEventId

ConstructL(TInt, TInt)

voidConstructL(TIntaPriority,
TIntaPref
)[private]

Second phase constructor

Parameters

TInt aPriority
TInt aPref

ConvertError(TInt)

voidConvertError(TIntaError)[virtual]

Do not support

Parameters

TInt aError

CustomInterface(TUid)

TAny *CustomInterface(TUidaInterfaceId)

Parameters

TUid aInterfaceId

DataType()

TFourCC DataType()const

DeviceMessage(TUid, const TDesC8 &)

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

Do not support

Parameters

TUid aMessageType
const TDesC8 & aMsg

DoShutDownTimerComplete()

voidDoShutDownTimerComplete()[private]

EmptyFifo(TInt)

voidEmptyFifo(TIntaError)[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)

voidInitializeComplete(TIntaError)[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,
TIntaPriority,
TIntaPref
)[static]

Parameters

MMdaAudioOutputStreamCallback & aCallback
TInt aPriority
TInt aPref

Open(TMdaPackage *)

voidOpen(TMdaPackage *aSettings)

Open a audio ouptut stream

Parameters

TMdaPackage * aSettings

Pause()

TInt Pause()

To pause send data to stream

PlayError(TInt)

voidPlayError(TIntaError)[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)

voidRealSetAudioPropertiesL(TIntaSampleRate,
TIntaChannels
)[private]

Parameters

TInt aSampleRate
TInt aChannels

RecordError(TInt)

voidRecordError(TIntaError)[virtual]

Do not support

Parameters

TInt aError

RegisterAudioResourceNotification(MMMFAudioResourceNotificationCallback &, TUid, const TDesC8 &)

TInt RegisterAudioResourceNotification(MMMFAudioResourceNotificationCallback &aCallback,
TUidaNotificationEventUid,
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 &)

voidSendEventToClient(const TMMFEvent &aEvent)[virtual]

Parameters

const TMMFEvent & aEvent

SetAudioPropertiesL(TInt, TInt)

voidSetAudioPropertiesL(TIntaSampleRate,
TIntaChannels
)

Set audio output stream properties

Parameters

TInt aSampleRate
TInt aChannels

SetBalanceL(TInt)

voidSetBalanceL(TIntaBalance =  KMMFBalanceCenter )

Set audio output stream balance

Parameters

TInt aBalance =  KMMFBalanceCenter

SetDataTypeL(TFourCC)

voidSetDataTypeL(TFourCCaAudioType)

Parameters

TFourCC aAudioType

SetPriority(TInt, TInt)

voidSetPriority(TIntaPriority,
TIntaPref
)

Set audio output stream priority

Parameters

TInt aPriority
TInt aPref

SetVolume(const TInt)

voidSetVolume(const TIntaVolume)

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()

voidStartPlayL()[private]

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

StartShutDownTimer()

voidStartShutDownTimer()[private]

Stop()

voidStop()

To stop write data to stream

ToneFinished(TInt)

voidToneFinished(TIntaError)[virtual]

Do not support

Parameters

TInt aError

Volume()

TInt Volume()

To get the current volume level

WillResumePlay()

TInt WillResumePlay()

WriteL(const TDesC8 &)

voidWriteL(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]