Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: MdaAudioSampleEditor.h
Link against: MediaClientAudio.lib

Class CMdaAudioConvertUtility

CMdaAudioConvertUtility

Support

Supported from 5.0

Description

Converts audio sample data from one format to another.

The audio sample data can be supplied either in a file or as a descriptor.

While this class is abstract, the static functions construct, initialise and return a pointer to an instance of a concrete class derived from this abstract class. This concrete class is part of the media server implementation and is private.

Derivation

CBaseBase class for all classes to be instantiated on the heap
CMdaAudioClipUtilityA utility class which implements behaviour which is common to both the audio recorder and the audio converter
CMdaAudioConvertUtilityConverts audio sample data from one format to another

Defined in CMdaAudioConvertUtility:
NewL(), OpenL()

Inherited from CBase:
operator new()

Inherited from CMdaAudioClipUtility:
ClearPlayWindow(), Close(), CropL(), Duration(), ENotReady, EOpen, EPlaying, ERecording, PlayL(), Position(), RecordL(), RecordTimeAvailable(), SetPlayWindow(), SetPosition(), SetRepeats(), State(), Stop(), TState, TypeL()


Construction


NewL()

static CMdaConvertUtility* NewL(MMdaObjectStateChangeObserver& aObserver, CMdaServer* aServer=NULL, TInt aPriority = EMdaPriorityNormal, TMdaPriorityPreference aPref = EMdaPriorityPreferenceTimeAndQuality);

Description

Constructs and initialises a new instance of the audio converter for converting audio sample data from one format to another.

The function leaves if the audio converter object cannot be created.

Parameters

MMdaObjectStateChangeObserver& aObserver

The audio clip observer.

CMdaServer* aServer=NULL

A pointer to a server object. The default is NULL which means that one is automatically constructed and owned by this audio converter object. If not NULL, the client must construct, and be responsible for, the server object. This option may be more efficient if a number of audio converter objects are to be created.

TInt aPriority=EMdaPriorityNormal

This client's relative priority. This is a value between -100 and +100 and represents a relative priority. A higher value indicates a more important request. The absolute priority at which a client application runs is device-specific.

TMdaPriorityPreference aPref=EMdaPriorityPreferenceTimeAndQuality

The required behaviour if a higher priority client takes over the sound output device.

Return value

CMdaConvertUtility*

Pointer to the new audio converter object

[Top]


Opening


OpenL()

void OpenL(const TDesC& aPrimaryFile, const TDesC& aSecondaryFile) = 0;

Description

Opens existing files so that audio sample data can be extracted from the source file, converted and appended to the target file.

Parameters

const TDesC& aPrimaryFile

The full path and filename of a file containing audio sample data to be converted.

const TDesC& aSecondaryFile

The full path and filename of a file to which converted data is appended.


OpenL()

void OpenL(const TDesC& aPrimaryFile,
           TMdaClipLocation* aLocation,
           TMdaClipFormat* aFormat,
           TMdaPackage* aArg1 = NULL,
           TMdaPackage* aArg2 = NULL) = 0;

Description

Opens an existing audio file so that audio sample data can be extracted from it, converted and placed into the target audio object.

Parameters

const TDesC& aPrimaryFile

The full path and filename of a file containing audio sample data to be converted.

TMdaClipLocation* aLocation

The target location for the audio data. This is normally a file (a TMdaFileClipLocation) or a descriptor (a TMdaDesClipLocation).

TMdaClipFormat* aFormat

The audio format for the target audio object.

TMdaPackage* aArg1 = NULL

The codec to use for the target audio object.

TMdaPackage* aArg2 = NULL

The audio settings for the target audio object.

See also:


OpenL()

void OpenL(TMdaClipLocation* aPriLocation,
           TMdaClipLocation* aSecLocation,
           TMdaClipFormat* aPriFormat,
           TMdaClipFormat* aSecFormat,
           TMdaPackage* aPriArg1 = NULL,
           TMdaPackage* aPriArg2 = NULL,
           TMdaPackage* aSecArg1 = NULL,
           TMdaPackage* aSecArg2 = NULL) = 0;

Description

Opens source and target audio objects.

Parameters

TMdaClipLocation* aPriLocation

The source location for audio data. This is normally a file (TMdaFileClipLocation) or a descriptor (TMdaDesClipLocation).

TMdaClipLocation* aLocation

The target location for audio data. This is normally a file (TMdaFileClipLocation) or a descriptor (TMdaDesClipLocation).

TMdaClipFormat* aPriFormat

The audio format of the source audio object.

TMdaClipFormat* aSecFormat

The audio format for the target audio object.

TMdaPackage* aPriArg1 = NULL

The codec used by the source audio object.

TMdaPackage* aPriArg2 = NULL

The codec to be used for the target audio object.

TMdaPackage* aSecArg1 = NULL

The audio settings of the source audio object

TMdaPackage* aSecArg2 = NULL

The audio settings for the target audio object