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.

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

Destructor.

Frees all resources owned by the object prior to its destruction.

Member Functions Documentation

CancelRegisterAudioResourceNotification(TUid)

IMPORT_C TIntCancelRegisterAudioResourceNotification(TUidaNotificationEventId)

Cancels the registered notification event.

Parameters

TUid aNotificationEventIdThe Event to notify the client.

ClearPlayWindow()

IMPORT_C TIntClearPlayWindow()

Clears the current playback window.

Since
7.0s

Close()

IMPORT_C voidClose()

Closes the current audio clip (allowing another clip to be opened).

Since
7.0s

ControllerImplementationInformationL()

IMPORT_C const CMMFControllerImplementationInformation &ControllerImplementationInformationL()

Returns the controller implementation information associated with the current controller.

Since
7.0s

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
)

Sends an asynchronous custom command to the controller.

Note: This method will return immediately. The RunL of the active object owning the aStatus parameter will be called when the command is completed by the controller framework.

Since
7.0s

Parameters

const TMMFMessageDestinationPckg & aDestinationThe destination of the message, consisting of the uid of the interface of this message.
TInt aFunctionThe function number to indicate which function is to be called on the interface defined in the aDestination parameter.
const TDesC8 & aDataTo1A reference to the first chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface being called. Can be KNullDesC8.
const TDesC8 & aDataTo2A reference to the second chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface being called. Can be KNullDesC8.
TDes8 & aDataFromA reference to an area of memory to which the controller framework will write any data to be passed back to the client. Can't be KNullDesC8."
TRequestStatus & aStatusThe TRequestStatus of an active object. This will contain the result of the request on completion. The exact range of result values is dependent on the interface.

CustomCommandAsync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TRequestStatus &)

IMPORT_C voidCustomCommandAsync(const TMMFMessageDestinationPckg &aDestination,
TIntaFunction,
const TDesC8 &aDataTo1,
const TDesC8 &aDataTo2,
TRequestStatus &aStatus
)

Sends an asynchronous custom command to the controller.

Note: This method will return immediately. The RunL of the active object owning the aStatus parameter will be called when the command is completed by the controller framework.

Since
7.0s

Parameters

const TMMFMessageDestinationPckg & aDestinationThe destination of the message, consisting of the uid of the interface of this message.
TInt aFunctionThe function number to indicate which function is to be called on the interface defined in the aDestination parameter.
const TDesC8 & aDataTo1A reference to the first chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface being called. Can be KNullDesC8.
const TDesC8 & aDataTo2A reference to the second chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface being called. Can be KNullDesC8.
TRequestStatus & aStatusThe TRequestStatus of an active object. This will contain the result of the request on completion. The exact range of result values is dependent on the interface.

CustomCommandSync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TDes8 &)

IMPORT_C TIntCustomCommandSync(const TMMFMessageDestinationPckg &aDestination,
TIntaFunction,
const TDesC8 &aDataTo1,
const TDesC8 &aDataTo2,
TDes8 &aDataFrom
)

Sends a synchronous custom command to the controller.

Since
7.0s

Parameters

const TMMFMessageDestinationPckg & aDestinationThe destination of the message, consisting of the UID of the interface of this message.
TInt aFunctionThe function number to indicate which function is to be called on the interface defined in the aDestination parameter.
const TDesC8 & aDataTo1A reference to the first chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface being called. Can be KNullDesC8.
const TDesC8 & aDataTo2A reference to the second chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface being called. Can be KNullDesC8.
TDes8 & aDataFromA reference to an area of memory to which the controller framework will write any data to be passed back to the client. Can't be KNullDesC8.

CustomCommandSync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &)

IMPORT_C TIntCustomCommandSync(const TMMFMessageDestinationPckg &aDestination,
TIntaFunction,
const TDesC8 &aDataTo1,
const TDesC8 &aDataTo2
)

Sends a synchronous custom command to the controller.

Since
7.0s

Parameters

const TMMFMessageDestinationPckg & aDestinationThe destination of the message, consisting of the UID of the interface of this message.
TInt aFunctionThe function number to indicate which function is to be called on the interface defined in the aDestination parameter.
const TDesC8 & aDataTo1A reference to the first chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface being called. Can be KNullDesC8.
const TDesC8 & aDataTo2A reference to the second chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface being called. Can be KNullDesC8.

Duration()

const TTimeIntervalMicroSeconds &Duration()[virtual]

Returns the duration of the audio sample in microseconds.

Since
5.0

Duration(TTimeIntervalMicroSeconds &)

IMPORT_C TMMFDurationInfoDuration(TTimeIntervalMicroSeconds &aDuration)

Returns the duration of the audio sample in microseconds, and the duration state.

Since
9.1

Parameters

TTimeIntervalMicroSeconds & aDurationThe duration of the sample in microseconds.

GetAudioLoadingProgressL(TInt &)

IMPORT_C voidGetAudioLoadingProgressL(TInt &aPercentageComplete)

Returns the current progress of audio loading.

Since
7.0s

Parameters

TInt & aPercentageCompleteThe percentage of the audio clip loaded.

GetBalance(TInt &)

IMPORT_C TIntGetBalance(TInt &aBalance)

Returns The current playback balance. This function may not return the same value as passed to SetBalance depending on the internal implementation in the underlying components.

Since
7.0s

Parameters

TInt & aBalanceA value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight.

GetBitRate(TUint &)

IMPORT_C TIntGetBitRate(TUint &aBitRate)

Returns the bit rate of the audio clip.

Since
7.0s

Parameters

TUint & aBitRateThe bit rate of the audio clip

GetDRMCustomCommand()

IMPORT_C MMMFDRMCustomCommand *GetDRMCustomCommand()

Gets a controller's DRM custom command implementation.

GetMetaDataEntryL(TInt)

IMPORT_C CMMFMetaDataEntry *GetMetaDataEntryL(TIntaMetaDataIndex)

Returns the requested meta data entry.

leave
KErrNotFound The meta data entry does not exist.
leave
KErrNotImplemented The controller does not support meta data information for this format.
Since
7.0s

Parameters

TInt aMetaDataIndexThe index number of the meta data to retrieve.

GetNumberOfMetaDataEntries(TInt &)

IMPORT_C TIntGetNumberOfMetaDataEntries(TInt &aNumEntries)

Returns the number of meta data entries in the current audio clip.

Since
7.0s

Parameters

TInt & aNumEntriesThe number of meta data entries in the header of the current clip.

GetPosition(TTimeIntervalMicroSeconds &)

IMPORT_C TIntGetPosition(TTimeIntervalMicroSeconds &aPosition)

Returns the current playback position in microseconds from the start of the clip.

Since
7.0s

Parameters

TTimeIntervalMicroSeconds & aPositionThe current time position in microseconds from the start of the clip to the current play position.

GetVolume(TInt &)

IMPORT_C TIntGetVolume(TInt &aVolume)

Returns the current playback volume.

Since
7.0s

Parameters

TInt & aVolumeA value between 0 and the maximum volume settings returned by MaxVolume().

MaxVolume()

TInt MaxVolume()[virtual]

Returns an integer representing the maximum volume.

This is the maximum value which can be passed to CMdaAudioPlayerUtility::SetVolume(). This value is platform independent, but is always greater than or equal to one.

panic
EMMFMediaClientPanicServerCommunicationProblem is raised when the audio player utility is not initialised.
Since
5.0

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

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

Constructs and initialises a new instance of the audio player utility for playing sampled audio data from a descriptor.

The audio data must be in a supported format (e.g. WAV and AU).

The function leaves if the audio player utility object cannot be created. When initialisation of the audio player utility is complete, successfully or otherwise, the callback function MMdaAudioPlayerCallback::MapcInitComplete() is called.

Note: The Priority Value and Priority Preference are used primarily when deciding what to do when several audio clients attempt to play or record simultaneously. In addition to the Priority Value and Preference, the adaptation may consider other parameters such as the SecureId and Capabilities of the client process. Whatever, the decision as to what to do in such situations is up to the audio adaptation, and may vary between different phones. Portable applications are advised not to assume any specific behaviour.

Parameters

const TDesC8 & aDataA descriptor containing the audio data. This descriptor must remain in existence for the lifetime of this audio player utility object.
MMdaAudioPlayerCallback & aCallbackThe audio player observer interface.
TInt aPriority = EMdaPriorityNormalThe Priority Value - this client's relative priority. This is a value between EMdaPriorityMin and EMdaPriorityMax and represents a relative priority. A higher value indicates a more important request.
TInt aPref = EMdaPriorityPreferenceTimeAndQualityThe Priority Preference - an additional audio policy parameter. The suggested default is EMdaPriorityPreferenceNone. Further values are given by TMdaPriorityPreference, and additional values may be supported by given phones and/or platforms, but should not be depended upon by portable code.
CMdaServer * aServer = NULLNot used in 7.0s. This parameter is provided for binary compatibility with previous versions.

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

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

Constructs and initialises a new instance of the audio player utility for playing sampled audio data from a read only descriptor.

The audio data must be in a supported format (e.g. WAV and AU).

The function leaves if the audio player utility object cannot be created. When initialisation of the audio player utility is complete, successfully or otherwise, the callback function MMdaAudioPlayerCallback::MapcInitComplete() is called.

Note: The Priority Value and Priority Preference are used primarily when deciding what to do when several audio clients attempt to play or record simultaneously. In addition to the Priority Value and Preference, the adaptation may consider other parameters such as the SecureId and Capabilities of the client process. Whatever, the decision as to what to do in such situations is up to the audio adaptation, and may vary between different phones. Portable applications are advised not to assume any specific behaviour.

Parameters

const TDesC8 & aDataA read only descriptor containing the audio data. This descriptor must remain in existence for the lifetime of this audio player utility object.
MMdaAudioPlayerCallback & aCallbackThe audio player observer interface.
TInt aPriority = EMdaPriorityNormalThe Priority Value - this client's relative priority. This is a value between EMdaPriorityMin and EMdaPriorityMax and represents a relative priority. A higher value indicates a more important request.
TInt aPref = EMdaPriorityPreferenceTimeAndQualityThe Priority Preference - an additional audio policy parameter. The suggested default is EMdaPriorityPreferenceNone. Further values are given by TMdaPriorityPreference, and additional values may be supported by given phones and/or platforms, but should not be depended upon by portable code.
CMdaServer * aServer = NULLNot used in 7.0s. This parameter is provided for binary compatibility with previous versions.

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

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

Constructs and initialises a new instance of the audio player utility for playing sampled audio data from a file. The audio data must be in a supported format (e.g. WAV and AU).

The function leaves if the audio player utility object cannot be created.

When initialisation of the audio player utility is complete, successfully or otherwise, the callback function MMdaAudioPlayerCallback::MapcInitComplete() is called.

Note: The Priority Value and Priority Preference are used primarily when deciding what to do when several audio clients attempt to play or record simultaneously. In addition to the Priority Value and Preference, the adaptation may consider other parameters such as the SecureId and Capabilities of the client process. Whatever, the decision as to what to do in such situations is up to the audio adaptation, and may vary between different phones. Portable applications are advised not to assume any specific behaviour.

Parameters

const TDesC & aFileNameThe full path name of the file containing the audio data.
MMdaAudioPlayerCallback & aCallbackThe audio player observer interface.
TInt aPriority = EMdaPriorityNormalThe Priority Value - this client's relative priority. This is a value between EMdaPriorityMin and EMdaPriorityMax and represents a relative priority. A higher value indicates a more important request.
TInt aPref = EMdaPriorityPreferenceTimeAndQualityThe Priority Preference - an additional audio policy parameter. The suggested default is EMdaPriorityPreferenceNone. Further values are given by TMdaPriorityPreference, and additional values may be supported by given phones and/or platforms, but should not be depended upon by portable code.
CMdaServer * aServer = NULLNot used in 7.0s. This parameter is provided for binary compatibility with previous versions.

NewL(MMdaAudioPlayerCallback &, TInt, TInt)

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

Constructs and initialises a new instance of the audio player utility.

The function leaves if the audio player utility object cannot be created.

No callback notification is made upon completion of NewL().

Note: The Priority Value and Priority Preference are used primarily when deciding what to do when several audio clients attempt to play or record simultaneously. In addition to the Priority Value and Preference, the adaptation may consider other parameters such as the SecureId and Capabilities of the client process. Whatever, the decision as to what to do in such situations is up to the audio adaptation, and may vary between different phones. Portable applications are advised not to assume any specific behaviour.

Parameters

MMdaAudioPlayerCallback & aCallbackThe audio player observer interface.
TInt aPriority = EMdaPriorityNormalThe Priority Value - this client's relative priority. This is a value between EMdaPriorityMin and EMdaPriorityMax and represents a relative priority. A higher value indicates a more important request.
TInt aPref = EMdaPriorityPreferenceTimeAndQualityThe Priority Preference - an additional audio policy parameter. The suggested default is EMdaPriorityPreferenceNone. Further values are given by TMdaPriorityPreference, and additional values may be supported by given phones and/or platforms, but should not be depended upon by portable code.

OpenDesL(const TDesC8 &)

IMPORT_C voidOpenDesL(const TDesC8 &aDescriptor)

Opens an audio clip from a descriptor.

The audio data must be in a supported format (for example, WAV or AU).

leave
KErrInUse If a previous open statement is awaiting notification of completion.
Since
7.0s

Parameters

const TDesC8 & aDescriptorA descriptor containing the audio clip.

OpenFileL(const TDesC &)

IMPORT_C voidOpenFileL(const TDesC &aFileName)

Opens an audio clip from a file.

The audio data must be in a supported format (for example, WAV or AU).

This function leaves with KErrNotReady if there is a previous open statement awaiting notification of completion.

leave
KErrNotReady If a previous open statement is awaiting notification of completion. opening the file
Since
7.0s

Parameters

const TDesC & aFileNameThe file to open.

OpenFileL(const RFile &)

IMPORT_C voidOpenFileL(const RFile &aFile)

Opens an audio clip from a file.

The audio data must be in a supported format (for example, WAV or AU).

This function leaves with KErrNotReady if there is a previous open statement awaiting notification of completion.

Note: it is generally advisable that the RFile is shared through the call RFs::ShareProtected(). This allows the adaptation to pass it to another process, if that is required. This is particularly true of playing DRM encrypted files.

leave
KErrBadHandle If the file handle is not shared through the call RFs::ShareProtected(), and the adaptation needs it to be.
leave
KErrNotReady If a previous open statement is awaiting notification of completion. opening the file

Parameters

const RFile & aFileThe open shared session file handle to use

OpenFileL(const TMMSource &)

IMPORT_C voidOpenFileL(const TMMSource &aSource)

Opens an audio clip from a file.

The audio data must be in a supported format (for example, WAV or AU).

This function leaves with KErrNotReady if there is a previous open statement awaiting notification of completion.

leave
KErrNotReady If a previous open statement is awaiting notification of completion. opening the file

Parameters

const TMMSource & aSourceThe file to open or an open file handle to use

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

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

Opens an audio clip from a URL.

The audio data must be in a supported format (for example, WAV or AU).

leave
KErrInUse If a previous open statement is awaiting notification of completion.
Since
7.0s

Parameters

const TDesC & aUrlThe URL to open.
TInt aIapId =  KUseDefaultIap Internet access point(IAP) ID to use. KUseDefaultIap selects the default IAP.
const TDesC8 & aMimeType =  KNullDesC8 MIME type of the URL source.

Pause()

IMPORT_C TIntPause()

Pauses the playback of the audio clip.

Since
7.0s

Play()

voidPlay()[virtual]

Begins playback of audio sample data at the current playback position using the current volume, gain and priority settings.

When playing of the audio sample is complete, successfully or otherwise, the callback function MMdaAudioPlayerCallback::MapcPlayComplete() is called.

If this function is called whilst already playing then MMdaAudioPlayerCallback::MapcPlayComplete will return with the error code KErrNotReady.

Since
5.0

RegisterAudioResourceNotification(MMMFAudioResourceNotificationCallback &, TUid, const TDesC8 &)

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

Registers the Event for Notification when resource is avaliable.

Parameters

MMMFAudioResourceNotificationCallback & aCallbackThe audio outputstream observer interface..
TUid aNotificationEventUidThe Event for which the client is registered.
const TDesC8 & aNotificationRegistrationData =  KNullDesC8 Notification registration specific data.

RegisterForAudioLoadingNotification(MAudioLoadingObserver &)

IMPORT_C voidRegisterForAudioLoadingNotification(MAudioLoadingObserver &aCallback)

Registers callback object to receive notifications of audio loading/rebuffering.

Since
7.0s

Parameters

MAudioLoadingObserver & aCallbackThe object to receive audio loading notifications.

SetBalance(TInt)

IMPORT_C TIntSetBalance(TIntaBalance =  KMMFBalanceCenter )

Sets the current playback balance.

Since
7.0s

Parameters

TInt aBalance =  KMMFBalanceCenter A value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight. The default value is KMMFBalanceCenter.

SetPlayWindow(const TTimeIntervalMicroSeconds &, const TTimeIntervalMicroSeconds &)

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

Defines a window on the audio sample data.

The window is defined in terms of a start and end position. When the current playback position reaches the window end position, or Stop() is called, the current playback position is set to the window start position and playback stops.

The current playback position is not affected by a call to SetPlayWindow() unless it is outside the new playback window, in which case it is set to the window start or end position depending on which one is closer.

The window persists until ClearPlayWindow() is called. Loading new audio sample data without adjusting or clearing the window will result in playback errors if the window is outside the new data.

Since
7.0s

Parameters

const TTimeIntervalMicroSeconds & aStartThe position defining the start of the window, measured in microseconds. If this value is less than zero, it is set to zero. If this value is greater than aEnd, then it is swapped with aEnd.
const TTimeIntervalMicroSeconds & aEndThe position defining the end of the window, measured in microseconds. If this value is greater than the value returned by Duration(), it is set to the value of Duration(). If this value is less than aStart, then it is swapped with aStart.

SetPosition(const TTimeIntervalMicroSeconds &)

IMPORT_C voidSetPosition(const TTimeIntervalMicroSeconds &aPosition)

Sets the current playback position in microseconds from the start of the clip.

Since
7.0s

Parameters

const TTimeIntervalMicroSeconds & aPositionThe position to move to in microseconds from the start of the clip.

SetPriority(TInt, TInt)

IMPORT_C TIntSetPriority(TIntaPriority,
TIntaPref
)

Sets the priority for playback. This is used to arbitrate between multiple objects trying to access a single sound device.

Parameters

TInt aPriorityThe Priority Value.
TInt aPrefThe Priority Preference.

SetRepeats(TInt, const TTimeIntervalMicroSeconds &)

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

Sets the number of times the audio sample is to be repeated during the playback operation.

A period of silence can follow each playing of the sample. The audio sample can be repeated indefinitely.

Since
5.0

Parameters

TInt aRepeatNumberOfTimesThe number of times the audio sample, together with the trailing silence, is to be repeated. If this is set to KMdaRepeatForever, then the audio sample, together with the trailing silence, is repeated indefinitely or until Stop() is called. If this is set to zero, then the audio sample is not repeated.
const TTimeIntervalMicroSeconds & aTrailingSilenceThe time interval of the trailing silence in microseconds.

SetThreadPriority(const TThreadPriority &)

IMPORT_C TIntSetThreadPriority(const TThreadPriority &aThreadPriority)const

Set the priority of the controller's sub thread.

This can be used to increase the responsiveness of the audio plugin to minimise any lag in processing. This function should be used with care as it may have knock-on effects elsewhere in the system.

Parameters

const TThreadPriority & aThreadPriorityThe TThreadPriority that the thread should run under. The default is EPriorityNormal.

SetVolume(TInt)

TInt SetVolume(TIntaVolume)[virtual]

Changes the current playback volume to a specified value.

The volume can be changed before or during playback and is effective immediately. The volume can be set to any value between zero (mute) and the maximum permissible volume (determined using MaxVolume()).

panic
EMMFMediaClientBadArgument is raised when the audio player utility is not initialised.
Since
5.0

Parameters

TInt aVolumeThe volume setting. This can be any value from zero to the value returned by a call to CMdaAudioPlayerUtility::MaxVolume(). Setting a zero value mutes the sound. Setting the maximum value results in the loudest possible sound. Values less than zero would be set to zero and the values greater than the maximum permitted volume would be set to the maximum volume.

SetVolumeRamp(const TTimeIntervalMicroSeconds &)

voidSetVolumeRamp(const TTimeIntervalMicroSeconds &aRampDuration)[virtual]

Defines the period over which the volume level is to rise smoothly from nothing to the normal volume level.

Since
5.0

Parameters

const TTimeIntervalMicroSeconds & aRampDurationThe period over which the volume is to rise. A zero value causes the audio sample to be played at the normal level for the full duration of the playback. A value which is longer than the duration of the audio sample means that the sample never reaches its normal volume level.

Stop()

voidStop()[virtual]

Stops playback of the audio sample as soon as possible.

If the audio sample is playing, playback is stopped as soon as possible. If playback is already complete, nothing further happens as a result of calling this function. The callback function MMdaAudioPlayerCallback::MapcPlayComplete() is not called.

Since
5.0

UseSharedHeap()

IMPORT_C voidUseSharedHeap()

Ensures that any subsequent calls to OpenXYZ() will create controllers that share a heap.

The default behaviour is that for each player utility a controller with its own heap is created. Each heap uses a chunk, so using this function avoids situations where the number of chunks per process is limited. The default behaviour is generally to be preferred, and should give lower overall memory usage. However, if many controllers are to be created for a particular thread, then this function should be used to prevent running out of heaps or chunks.

Since
9.1

WillResumePlay()

IMPORT_C TIntWillResumePlay()

Waits for the client to resume the play even after the default timer expires.

Member Data Documentation

CMMFMdaAudioPlayerUtility * iProperties

CMMFMdaAudioPlayerUtility *iProperties[protected]

This member is internal and not intended for use.