CMdaAudioPlayerUtility Class Reference

class CMdaAudioPlayerUtility : public CBase

Plays sampled audio data.

The class offers a simple interface to open, play and obtain information from, sampled audio data. The audio data can be supplied either in a file (file-based), as a descriptor (descriptor-based) or as a URL reference (since version 7.0s).

While this class is abstract, the three static functions construct, initialise and return pointers to instances of concrete classes derived from this abstract class.

5.0

Inherits from

  • CMdaAudioPlayerUtility
Public Member Functions
~CMdaAudioPlayerUtility()
IMPORT_C TIntCancelRegisterAudioResourceNotification(TUid)
IMPORT_C TIntClearPlayWindow()
IMPORT_C voidClose()
IMPORT_C const CMMFControllerImplementationInformation &ControllerImplementationInformationL()
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 &)
const TTimeIntervalMicroSeconds &Duration()
IMPORT_C TMMFDurationInfoDuration(TTimeIntervalMicroSeconds &)
IMPORT_C voidGetAudioLoadingProgressL(TInt &)
IMPORT_C TIntGetBalance(TInt &)
IMPORT_C TIntGetBitRate(TUint &)
IMPORT_C MMMFDRMCustomCommand *GetDRMCustomCommand()
IMPORT_C CMMFMetaDataEntry *GetMetaDataEntryL(TInt)
IMPORT_C TIntGetNumberOfMetaDataEntries(TInt &)
IMPORT_C TIntGetPosition(TTimeIntervalMicroSeconds &)
IMPORT_C TIntGetVolume(TInt &)
TInt MaxVolume()
IMPORT_C CMdaAudioPlayerUtility *NewDesPlayerL(const TDesC8 &, MMdaAudioPlayerCallback &, TInt, TInt, CMdaServer *)
IMPORT_C CMdaAudioPlayerUtility *NewDesPlayerReadOnlyL(const TDesC8 &, MMdaAudioPlayerCallback &, TInt, TInt, CMdaServer *)
IMPORT_C CMdaAudioPlayerUtility *NewFilePlayerL(const TDesC &, MMdaAudioPlayerCallback &, TInt, TInt, CMdaServer *)
IMPORT_C CMdaAudioPlayerUtility *NewL(MMdaAudioPlayerCallback &, TInt, TInt)
IMPORT_C voidOpenDesL(const TDesC8 &)
IMPORT_C voidOpenFileL(const TDesC &)
IMPORT_C voidOpenFileL(const RFile &)
IMPORT_C voidOpenFileL(const TMMSource &)
IMPORT_C voidOpenUrlL(const TDesC &, TInt, const TDesC8 &)
IMPORT_C TIntPause()
voidPlay()
IMPORT_C TIntRegisterAudioResourceNotification(MMMFAudioResourceNotificationCallback &, TUid, const TDesC8 &)
IMPORT_C voidRegisterForAudioLoadingNotification(MAudioLoadingObserver &)
IMPORT_C TIntSetBalance(TInt)
IMPORT_C TIntSetPlayWindow(const TTimeIntervalMicroSeconds &, const TTimeIntervalMicroSeconds &)
IMPORT_C voidSetPosition(const TTimeIntervalMicroSeconds &)
IMPORT_C TIntSetPriority(TInt, TInt)
voidSetRepeats(TInt, const TTimeIntervalMicroSeconds &)
IMPORT_C TIntSetThreadPriority(const TThreadPriority &)
TInt SetVolume(TInt)
voidSetVolumeRamp(const TTimeIntervalMicroSeconds &)
voidStop()
IMPORT_C voidUseSharedHeap()
IMPORT_C TIntWillResumePlay()
Private Member Functions
CMdaAudioPlayerUtility()
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()
Protected Attributes
CMMFMdaAudioPlayerUtility *iProperties

Constructor & Destructor Documentation

CMdaAudioPlayerUtility()

CMdaAudioPlayerUtility()[private]

~CMdaAudioPlayerUtility()

~CMdaAudioPlayerUtility()

Member Functions Documentation

CancelRegisterAudioResourceNotification(TUid)

IMPORT_C TIntCancelRegisterAudioResourceNotification(TUidaNotificationEventId)

Parameters

TUid aNotificationEventId

ClearPlayWindow()

IMPORT_C TIntClearPlayWindow()

Close()

IMPORT_C voidClose()

ControllerImplementationInformationL()

IMPORT_C const CMMFControllerImplementationInformation &ControllerImplementationInformationL()

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
)

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
)

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
)

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
)

Parameters

const TMMFMessageDestinationPckg & aDestination
TInt aFunction
const TDesC8 & aDataTo1
const TDesC8 & aDataTo2

Duration()

const TTimeIntervalMicroSeconds &Duration()[virtual]

Duration(TTimeIntervalMicroSeconds &)

IMPORT_C TMMFDurationInfoDuration(TTimeIntervalMicroSeconds &aDuration)

Parameters

TTimeIntervalMicroSeconds & aDuration

GetAudioLoadingProgressL(TInt &)

IMPORT_C voidGetAudioLoadingProgressL(TInt &aPercentageComplete)

Parameters

TInt & aPercentageComplete

GetBalance(TInt &)

IMPORT_C TIntGetBalance(TInt &aBalance)

Parameters

TInt & aBalance

GetBitRate(TUint &)

IMPORT_C TIntGetBitRate(TUint &aBitRate)

Parameters

TUint & aBitRate

GetDRMCustomCommand()

IMPORT_C MMMFDRMCustomCommand *GetDRMCustomCommand()

GetMetaDataEntryL(TInt)

IMPORT_C CMMFMetaDataEntry *GetMetaDataEntryL(TIntaMetaDataIndex)

Parameters

TInt aMetaDataIndex

GetNumberOfMetaDataEntries(TInt &)

IMPORT_C TIntGetNumberOfMetaDataEntries(TInt &aNumEntries)

Parameters

TInt & aNumEntries

GetPosition(TTimeIntervalMicroSeconds &)

IMPORT_C TIntGetPosition(TTimeIntervalMicroSeconds &aPosition)

Parameters

TTimeIntervalMicroSeconds & aPosition

GetVolume(TInt &)

IMPORT_C TIntGetVolume(TInt &aVolume)

Parameters

TInt & aVolume

MaxVolume()

TInt MaxVolume()[virtual]

NewDesPlayerL(const TDesC8 &, MMdaAudioPlayerCallback &, TInt, TInt, CMdaServer *)

IMPORT_C CMdaAudioPlayerUtility *NewDesPlayerL(const TDesC8 &aData,
MMdaAudioPlayerCallback &aCallback,
TIntaPriority = EMdaPriorityNormal,
TIntaPref = EMdaPriorityPreferenceTimeAndQuality,
CMdaServer *aServer = NULL
)[static]

Parameters

const TDesC8 & aData
MMdaAudioPlayerCallback & aCallback
TInt aPriority = EMdaPriorityNormal
TInt aPref = EMdaPriorityPreferenceTimeAndQuality
CMdaServer * aServer = NULL

NewDesPlayerReadOnlyL(const TDesC8 &, MMdaAudioPlayerCallback &, TInt, TInt, CMdaServer *)

IMPORT_C CMdaAudioPlayerUtility *NewDesPlayerReadOnlyL(const TDesC8 &aData,
MMdaAudioPlayerCallback &aCallback,
TIntaPriority = EMdaPriorityNormal,
TIntaPref = EMdaPriorityPreferenceTimeAndQuality,
CMdaServer *aServer = NULL
)[static]

Parameters

const TDesC8 & aData
MMdaAudioPlayerCallback & aCallback
TInt aPriority = EMdaPriorityNormal
TInt aPref = EMdaPriorityPreferenceTimeAndQuality
CMdaServer * aServer = NULL

NewFilePlayerL(const TDesC &, MMdaAudioPlayerCallback &, TInt, TInt, CMdaServer *)

IMPORT_C CMdaAudioPlayerUtility *NewFilePlayerL(const TDesC &aFileName,
MMdaAudioPlayerCallback &aCallback,
TIntaPriority = EMdaPriorityNormal,
TIntaPref = EMdaPriorityPreferenceTimeAndQuality,
CMdaServer *aServer = NULL
)[static]

Parameters

const TDesC & aFileName
MMdaAudioPlayerCallback & aCallback
TInt aPriority = EMdaPriorityNormal
TInt aPref = EMdaPriorityPreferenceTimeAndQuality
CMdaServer * aServer = NULL

NewL(MMdaAudioPlayerCallback &, TInt, TInt)

IMPORT_C CMdaAudioPlayerUtility *NewL(MMdaAudioPlayerCallback &aCallback,
TIntaPriority = EMdaPriorityNormal,
TIntaPref = EMdaPriorityPreferenceTimeAndQuality
)[static]

Parameters

MMdaAudioPlayerCallback & aCallback
TInt aPriority = EMdaPriorityNormal
TInt aPref = EMdaPriorityPreferenceTimeAndQuality

OpenDesL(const TDesC8 &)

IMPORT_C voidOpenDesL(const TDesC8 &aDescriptor)

Parameters

const TDesC8 & aDescriptor

OpenFileL(const TDesC &)

IMPORT_C voidOpenFileL(const TDesC &aFileName)

Parameters

const TDesC & aFileName

OpenFileL(const RFile &)

IMPORT_C voidOpenFileL(const RFile &aFile)

Parameters

const RFile & aFile

OpenFileL(const TMMSource &)

IMPORT_C voidOpenFileL(const TMMSource &aSource)

Parameters

const TMMSource & aSource

OpenUrlL(const TDesC &, TInt, const TDesC8 &)

IMPORT_C voidOpenUrlL(const TDesC &aUrl,
TIntaIapId =  KUseDefaultIap ,
const TDesC8 &aMimeType =  KNullDesC8
)

Parameters

const TDesC & aUrl
TInt aIapId =  KUseDefaultIap
const TDesC8 & aMimeType =  KNullDesC8

Pause()

IMPORT_C TIntPause()

Play()

voidPlay()[virtual]

RegisterAudioResourceNotification(MMMFAudioResourceNotificationCallback &, TUid, const TDesC8 &)

IMPORT_C TIntRegisterAudioResourceNotification(MMMFAudioResourceNotificationCallback &aCallback,
TUidaNotificationEventUid,
const TDesC8 &aNotificationRegistrationData =  KNullDesC8
)

Parameters

MMMFAudioResourceNotificationCallback & aCallback
TUid aNotificationEventUid
const TDesC8 & aNotificationRegistrationData =  KNullDesC8

RegisterForAudioLoadingNotification(MAudioLoadingObserver &)

IMPORT_C voidRegisterForAudioLoadingNotification(MAudioLoadingObserver &aCallback)

Parameters

MAudioLoadingObserver & aCallback

SetBalance(TInt)

IMPORT_C TIntSetBalance(TIntaBalance =  KMMFBalanceCenter )

Parameters

TInt aBalance =  KMMFBalanceCenter

SetPlayWindow(const TTimeIntervalMicroSeconds &, const TTimeIntervalMicroSeconds &)

IMPORT_C TIntSetPlayWindow(const TTimeIntervalMicroSeconds &aStart,
const TTimeIntervalMicroSeconds &aEnd
)

Parameters

const TTimeIntervalMicroSeconds & aStart
const TTimeIntervalMicroSeconds & aEnd

SetPosition(const TTimeIntervalMicroSeconds &)

IMPORT_C voidSetPosition(const TTimeIntervalMicroSeconds &aPosition)

Parameters

const TTimeIntervalMicroSeconds & aPosition

SetPriority(TInt, TInt)

IMPORT_C TIntSetPriority(TIntaPriority,
TIntaPref
)

Parameters

TInt aPriority
TInt aPref

SetRepeats(TInt, const TTimeIntervalMicroSeconds &)

voidSetRepeats(TIntaRepeatNumberOfTimes,
const TTimeIntervalMicroSeconds &aTrailingSilence
)[virtual]

Parameters

TInt aRepeatNumberOfTimes
const TTimeIntervalMicroSeconds & aTrailingSilence

SetThreadPriority(const TThreadPriority &)

IMPORT_C TIntSetThreadPriority(const TThreadPriority &aThreadPriority)const

Parameters

const TThreadPriority & aThreadPriority

SetVolume(TInt)

TInt SetVolume(TIntaVolume)[virtual]

Parameters

TInt aVolume

SetVolumeRamp(const TTimeIntervalMicroSeconds &)

voidSetVolumeRamp(const TTimeIntervalMicroSeconds &aRampDuration)[virtual]

Parameters

const TTimeIntervalMicroSeconds & aRampDuration

Stop()

voidStop()[virtual]

UseSharedHeap()

IMPORT_C voidUseSharedHeap()

WillResumePlay()

IMPORT_C TIntWillResumePlay()

Member Data Documentation

CMMFMdaAudioPlayerUtility * iProperties

CMMFMdaAudioPlayerUtility *iProperties[protected]

This member is internal and not intended for use.