Effects API: Technical Specification

Type of the Interface

All the Effect interfaces are method calls. However, the Effects Framework relies on the MMF Controller Framework, which has a client-server boundary. When the client issues requests, the requests and data are encapsulated into messages that can be passed across the client-server boundary. Synchronous method calls block the client’s thread until they return, but most of the client’s method calls do not require a message to be sent. For the ones that do generate a message, they are completed immediately when possible.

Interface Class Structure

Figure 1:  Interface class structure

All the Effect APIs have the same structure. Each effect has an observer interface that must be realized by an observer class if the client is interested in receiving notification events from the effect. The observer class is registered with the effect it is interested in receiving events.

The client creates an effect instance by using one of the NewL() methods in the effect subclass. See Detailed Description for a detail description of each effect subclasses.

Usage

Protocol

Each effect is associated with an audio stream. This association with the audio stream is made when the effect is created by passing in the MDA utility that controls the audio stream in the effect’s NewL method. The client application should create the effect after it has initialized the MDA audio utility, but before it starts playing the audio. Conversely, the effect should be deleted before the MDA utility is deleted.

By default, an effect is disabled when it is created. After it has been created, it is up to the application to configure the effect and then enable it. Some effects can be configured and enabled when they are constructed.

To configure an effect, the application calls the appropriate set methods on the effect. After the effect is configured, the application then calls the ApplyL() method on the effect to apply the new settings. Settings are automatically applied when they are enabled or disabled.

Effect processing is started by calling the EnableL() method on the effect. Enabling an effect that is already enabled does nothing. To stop processing an effect, the DisableL() method on the effect is called. Disabling an effect that is already disabled does nothing.

It is possible for an application to update the settings of an effect when the audio is playing, but it is dependent on the specific hardware and drivers of a device whether or not these changes will have an effect.

Due to hardware limitations, it is possible that some hardware platforms can only support a limited number of instances of a specific effect. In this case, the effect will no longer be applied to the lowest priority audio streams. By default, the audio drivers will continue playing the audio streams without the effect applied. However, if the application does not want the audio to play without the effect applied, it can call the Enforce method on the effect. In this case, the audio will pre-empt the audio stream through the utility that controls that audio stream with the error KErrEnforcedEffectPreempted.

Depending on hardware capability, it is also possible to have one setting for an effect type that is being applied to multiple streams. In this case, only the highest priority audio stream will be allowed to modify the effect parameters. In the case where the priorities of the audio streams are the same, the application that set up the effect last will be the one that is allowed to modify the effect parameters. The applications that lose the right to update the effect will be notified through the observer interface with the event KLostUpdateRights. When an application regains the right to control the effects settings, it will be notified through the observer interface with the event KGaindUpdateRights. By default, all effects will initially have the update rights.

Effect processing is optional. In the case where it is not supported, the NewL() methods for the effects will leave with KErrNotSupported. Even if effect processing is supported, it is not guaranteed that every method of an effect will be implemented. In this case, unsupported operations on the effect will be ignored by the audio system.

Currently, Tone and Stream Utilities do not support custom interfaces. NewLs with custom interfaces as arguments will leave with KErrNotSupported.

Error Handling

The leave mechanism of the Symbian OS environment is used to handle exception situations. Each leaving method has a list of possible leave codes and the meaning of the code. The client should TRAP the leaving methods and handle them appropriately or leave it up to a higher-level TRAP harness.

A number of error conditions can occur when the Effect APIs are used. Each Effect API has different error conditions. Refer to the Detailed Description for the specific effect error conditions. The rrrors common to all effects are listed in the table below.

Error code Explanation
KErrAccessDenied Attempting to apply effect settings when the effect has lost update rights.
KErrArgument Attempting to set an effect setting to an invalid value.
KErrNoMemory Insufficient amount of memory available to carry out the operation.
KErrNotSupported< The specified effect is not supported during effect creation process.
Memory Overhead

For each effect interface object created, there will be two additional support objects and an adaption custom interface effect object created. The size of the support object depends on the effect type. Some effects have larger data structures than others but, in general, each effect object will require an estimated 2 Kbytes of RAM.

Extensions to the API

The basic functionality of an Effect API can be extended, but this will introduce binary compatibility issues if the interface class is changed. However, new effect classes with additional functionality can be created through derivation.

Example Usage of an Effect

This example shows how an equalizer effect can be used by the client audio application.

Prerequisites:

An MDA Player utility has been created.

Note: The MDA Utility (a player utility in this example) should not be deleted before deleting the effect object (equalizer effect in this example).

The following subsections illustrate the stages of an equalizer effect lifecycle. All effects have similar sequences while their operations and events may be different.

Creating the Effect

The equalizer effect is created using the usual NewL() method. The client may register an observer with the effect. The effect is now ready to be used.

Figure 2:  Creating the effect

Changing the Effect Settings

After the creation, the equalizer object assumes an initial state. The initial equalizer value varies and is set by the underlying audio system. Settings are made using one of the available set methods on the object.

Here, the preset values in the equalizer are checked and the values are changed. At this point, the equalizer preset has not been applied. It is possible to change the value many times before application but, unless the presets are applied, they will not take effect.

Figure 3:  Changing the effect settings

Applying the Effect Settings

Effect settings are applied in one of two ways: Enable() or ApplyL().

The Enable() method must be used to enable the effect if it is disabled. Initially, all effects are disabled. Enabling will cause the effect settings to be applied. After the effect is enabled, new settings are applied by using the ApplyL() method. The following figure shows a new setting being applied after the effect is enabled.

Figure 4:  Applying the effect settings

Spontaneous Events

Events may occur spontaneously during the lifetime of the effect. These events are reported to the client through the EffectChange() callback. Clients should expect to receive event notifications after successful registration. See Creating the Effect section for the registration sequence. If the client does not want to receive further event notifications, use the UnregisterObserver() method. It is not advisable to not monitor events if the effect is enabled.

Figure 5:  Spontaneous events

The sequence in The figure above follows the sequences in Changing the Effect Settings and Applying the Effect Settings. When attempting to apply the effect on the stream, the effect cannot be applied. In this case, the effect does not have update rights. Additionally, because the client has indicated that the effect has to be enforced, the stream is pre-empted as well.

Disabling and Removing the Effect

An effect can be disabled using the DisableL() method. After disabling, the effect can be removed by deleting the object. The client can also delete the effect without disabling it first.

Figure 6:  Disabling and removing the effect

Detailed Description

This section describes the classes and methods in the Effects Framework.

CAudioEffect

This abstract class is a generalization of all effects and defines properties and operation that are common for all effects.

Figure 7:  CAudioEffect

Headers:

AudioEffectBase.H, AudioEffectData.H, MAudioEffectObserver.H

Library:

AudioEffect.DLL

ApplyL
virtual void ApplyL() = 0;

Applies updated settings to the effect. Apply is automatically called when the effect goes from disabled to enabled or vice versa. It is not called when Enable is called and the effect is already enabled. This method will block the client’s thread.

Arguments:

None.

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

DisableL
virtual void DisableL() = 0;

This method is used for disabling the effect. If the effect is already disabled, any call to this method is ignored.

Arguments:

None.

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

EnableL
virtual void EnableL() = 0;

This method is used for enabling the effect. If the effect is already enabled, any call to this method is ignored.

Arguments:

None.

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

EnforceL
virtual void EnforceL(TBool aEnforced) = 0;

Defines whether the effect is mandatory. When this is set to Etrue, the audio stream will not be processed unless the audio platform can add this effect. If this is set to Efalse, the audio platform will process the audio stream even if it cannot add the effect.

Arguments:

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

HaveUpdateRights
virtual TBool HaveUpdateRights() const;

A client can lose update rights in some hardware platforms where only a limited number of instances of an effect can exist at the same time. When there is a greater number of requested instances than supported, that audio drivers will remove the update rights of some of the instances temporarily. When an effect instance has lost update rights, the user can still change the effect settings, but any calls to apply the settings will be deferred until update rights are regained.

Arguments:

None.

Returns:

ETrue if this object currently has rights to update the settings of this effect, otherwise EFalse.

IsEnabled
virtual TBool IsEnabled() const;

Used by a client to determine if the effect is enabled.

Arguments:

None.

Returns:

ETrue if the effect is enabled, otherwise EFalse.

virtual TBool IsEnforced() const;

Used by a client to determine if the effect is set as enforced.

Arguments:

None.

Returns:

ETrue if the effect is enforced, otherwise EFalse.

RegisterObserverL
virtual void RegisterObserverL(MAudioEffectObserver& aObserver);

Adds an observer that implements MAudioEffectObserver. Observers will be notified when the effect changes.

Arguments:

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

Uid
virtual TUid Uid() const = 0;

Used by a client to fetch the unique identifier associated with the effect.

Arguments:

None.

Returns:

The unique identifier.

UnregisterObserver
virtual void UnRegisterObserver(MAudioEffectObserver& aObserver);

Removes the specified observer from an effect.

Arguments:

Returns:

None.

MAudioEffectObserver

This abstract class is a generalization of the observer classes for all audio effects. Individual effects can extend this to add needed observer methods.

EffectChanged
virtual void EffectChanged(const CAudioEffect* aObservedEffect, TUint8 aEvent) 0;

Invoked by the audio effect object when the status of the audio effect has changed.

Arguments:

Returns:

None.

CBassBoost

This class is used by an audio application for controlling bass boost. It is derive from CAudioEffect (see CAudioEffect).

Figure 8:  CBassBoost

Headers:

BassBoostEffect.H, BassBoostEffectData.H, MBassBoostEffectObserver.H

Library:

BassBosotEffect.DLL

NewL factory methods
CBassBoost* NewL(CMMFDevSound& aDevSound, TBool aEnable = Efalse);

A static constructor that creates a bass boost object.

Arguments:

Returns:

A pointer to CBassBoost.

Error handling:

This method leaves with the following typical leave codes:

CBassBoost* NewL(CMdaAudioConvertUtility& aUtility, TBool aEnable = Efalse);

A static constructor that creates a bass boost object.

Arguments:

Returns:

A pointer to CBassBoost.

Error handling:

This method leaves with the following typical leave codes:

CBassBoost* NewL(CMdaAudioInputStream& aUtility, TBool aEnable = EFalse);

A static constructor that creates a bass boost object.

Arguments:

Returns:

A pointer to CBassBoost.

Error handling:

This method leaves with the following typical leave codes:

CBassBoost* NewL(CMdaAudioOutputStream& aUtility, TBool aEnable = EFalse);

A static constructor that creates a bass boost object.

Arguments:

Returns:

A pointer to CBassBoost.

Error handling:

This method leaves with the following typical leave codes:

CBassBoost* NewL(CMdaAudioPlayerUtility& aUtility, TBool aEnable = EFalse);

A static constructor that creates a bass boost object.

Arguments:

Returns:

A pointer to CBassBoost.

Error handling:

This method leaves with the following typical leave codes:

CBassBoost* NewL(CMdaAudioRecordUtility& aUtility, TBool aRecordStream, TBool aEnable = EFalse);

A static constructor that creates a bass boost object.

Arguments:

Returns:

A pointer to CBassBoost.

Error handling:

This method leaves with the following typical leave codes:

CBassBoost* NewL(CMdaAudioToneUtility& aUtility, TBool aEnable = EFalse);

A static constructor that creates a bass boost object.

Arguments:

Returns:

A pointer to CBassBoost.

Error handling:

This method leaves with the following typical leave codes:

CBassBoost* NewL(MCustomCommand& aUtility, TBool aEnable = EFalse);

A static constructor that creates a bass boost object.

Arguments:

Returns:

A pointer to CBassBoost.

Error handling:

This method leaves with the following typical leave codes:

CBassBoost* NewL(MCustomInterface& aCustomInterface, TBool aEnable = EFalse);

A static constructor that creates a bass boost object.

Arguments:

Returns:

A pointer to CBassBoost.

Error handling:

This method leaves with the following typical leave codes:

BassBoostLevel
TUint8 BassBoostLevel() const;

Gets the bass boost level setting.

Arguments:

None.

Returns:

The bass boost level.

SetBassBoostLevelL
void SetBassBoostLevelL(TUint8 aLevel);

Sets the bass boost level.

Arguments:

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

MBassBoostObserver

This abstract class is a generalization of the bass boost observer. It defines the possible events that are specific to the bass boost effect. It is derived from MAudioEffectObserver (see MAudioEffectObserver).

Figure 9:  MBassBoostObserver

Methods:

EffectChanged(). Inherited from MAudioEffectObserver (see MAudioEffectObserver).

CDoppler

This class is used by audio applications for controlling doppler. It is derived from CAudioEffect (see CAudioEffect).

Figure 10:  CDoppler

Headers:

DopplerEffect.H, DopplerEffectData.H, MDopplerEffectObserver.H

Library:

DopplerEffect.DLL

NewL − factory methods
CDoppler* NewL(CMMFDevSound& aDevSound);

A static constructor that creates a doppler object.

Arguments:

Returns:

A pointer to CDoppler.

Error handling:

This method leaves with the following typical leave codes:

CDoppler* NewL(CMdaAudioConvertUtility& aUtility);

A static constructor that creates a doppler object.

Arguments:

Returns:

A pointer to CDoppler.

Error handling:

This method leaves with the following typical leave codes:

CDoppler* NewL(CMdaAudioInputStream& aUtility);

A static constructor that creates a doppler object.

Arguments:

Returns:

A pointer to CDoppler.

Error handling:

This method leaves with the following typical leave codes:

CDoppler* NewL(CMdaAudioOutputStream& aUtility);

A static constructor that creates a doppler object.

Arguments:

Returns:

A pointer to CDoppler.

Error handling:

This method leaves with the following typical leave codes:

CDoppler* NewL(CMdaAudioPlayerUtility& aUtility);

A static constructor that creates a doppler object.

Arguments:

Returns:

A pointer to CDoppler.

Error handling:

This method leaves with the following typical leave codes:

CDoppler* NewL(CMdaAudioRecordUtility& aUtility, TBool aRecordStream);

A static constructor that creates a doppler object.

Arguments:

Returns:

A pointer to CDoppler.

Error handling:

This method leaves with the following typical leave codes:

CDoppler* NewL(CMdaAudioToneUtility& aUtility);

A static constructor that creates a doppler object.

Arguments:

CMdaAudioToneUtility& aUtility: The tone utility that is to be associated with this effect.

Returns:

A pointer to CDoppler.

Error handling:

This method leaves with the following typical leave codes:

CDoppler* NewL(MCustomCommand& aUtility);

A static constructor that creates a doppler object.

Arguments:

Returns:

A pointer to CDoppler.

Error handling:

This method leaves with the following typical leave codes:

CDoppler* NewL(MCustomInterface& aCustomInterface);

A static constructor that creates a doppler object.

Arguments:

Returns:

A pointer to CDoppler.

Error handling:

This method leaves with the following typical leave codes:

CartesianVelocity
void CartesianVelocity(TInt32& aX, TInt32& aY, TInt32& aZ);

Gets the velocity’s Cartesian settings.

Arguments:

Returns:

None.

Factor
TUint32 Factor() const;

Gets the current factor setting value.

Arguments:

None.

Returns:

The current factor setting value.

FactorMax
TUint32 FactorMax() const;

Gets the factor setting maximum value.

Arguments:

None.

Returns:

The factor setting maximum value.

SetCartesianVelocity
void SetCartesianVelocityL(TInt32 aX, TInt32 aY, TInt32 aZ);

Sets the velocity in Cartesian coordinates of the sound source with respect to the listener.

Arguments:

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

SetFactorL
void SetFactorL(TUint32 aFactor);

Sets the multiplier factor.

Arguments:

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

SetSphericalVelocityL
void SetSphericalVelocityL(TInt32 aAzimuth, TInt32 aElevation, TInt32 aRadius);

Sets the velocity in spherical coordinates of the sound source with respect to the listener.

Arguments:

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

SphericalVelocity
void SphericalVelocity(TInt32& aAzimuth, TInt32& aElevation, TInt32& aRadius);

Gets the velocity’s Cartesian settings.

Arguments:

Returns:

None.

MDopplerObserver

This abstract class is a generalization of the doppler observer. It defines the possible events that are specific to the doppler effect. It is derived from MAudioEffectObserver (see MAudioEffectObserver section).

Figure 11:  MDopplerObserver

Methods:

EffectChanged(). Inherited from MAudioEffectObserver (see MAudioEffectObserver section).

CAudioEqualizer

This class is used by audio applications for controlling audio equalization. It is derived from CAudioEffect (see CAudioEffect section).

Figure 12:  CAudioEqualizer

Headers:

EqualizerEffect.H, EqualizerEffectData.H, MEqualizerEffectObserver.H

Library:

EqualizerEffect.DLL

NewL − factory methods
CAudioEqualizer* NewL(CMMFDevSound& aDevSound);

A static constructor that creates an audio equalizer object.

Arguments:

Returns:

A pointer to a CAudioEqualizer object.

Error handling:

This method leaves with the following typical leave codes:

CAudioEqualizer* NewL(CMdaAudioConvertUtility& aUtility);

A static constructor that creates an audio equalizer object.

Arguments:

Returns:

A pointer to a CAudioEqualizer object.

Error handling:

This method leaves with the following typical leave codes:

CAudioEqualizer* NewL(CMdaAudioInputStream& aUtility);

A static constructor that creates an audio equalizer object.

Arguments:

Returns:

A pointer to a CAudioEqualizer object.

Error handling:

This method leaves with the following typical leave codes:

CAudioEqualizer* NewL(CMdaAudioOutputStream& aUtility);

A static constructor that creates an audio equalizer object.

Arguments:

Returns:

A pointer to a CAudioEqualizer object.

Error handling:

This method leaves with the following typical leave codes:

CAudioEqualizer* NewL(CMdaAudioPlayerUtility& aUtility);

A static constructor that creates an audio equalizer object.

Arguments:

Returns:

A pointer to a CAudioEqualizer object.

Error handling:

This method leaves with the following typical leave codes:

CAudioEqualizer* NewL(CMdaAudioRecordUtility& aUtility, TBool aRecordStream);

A static constructor that creates an audio equalizer object.

Arguments:

Returns:

A pointer to a CAudioEqualizer object.

Error handling:

This method leaves with the following typical leave codes:

CAudioEqualizer* NewL(CMdaAudioToneUtility& aUtility);

A static constructor that creates an audio equalizer object.

Arguments:

Returns:

A pointer to a CAudioEqualizer object.

Error handling:

This method leaves with the following typical leave codes:

CAudioEqualizer* NewL(MCustomCommand& aUtility);

A static constructor that creates an audio equalizer object.

Arguments:

Returns:

A pointer to a CAudioEqualizer object.

Error handling:

This method leaves with the following typical leave codes:

CAudioEqualizer* NewL(MCustomInterface& aCustomInterface);

A static constructor that creates an audio equalizer object.

Arguments:

Returns:

A pointer to a CAudioEqualizer object.

Error handling:

This method leaves with the following typical leave codes:

BandLevel
TInt32 BandLevel(TUint8 aBand) const;

Gets the band level in mB for the specified band.

Arguments:

Returns:

The level in mB for the specified band, otherwise KErrArgument if aBand is invalid.

TInt32 BandWidth(TUint8 aBand) const;

Gets the bandwidth in Hz for the specified band.

Arguments:

Returns:

The bandwidth in Hz for the specified band, otherwise KErrArgument if aBand is invalid.

CenterFrequency
TInt32 CenterFrequency(TUint8 aBand) const;

Gets the center frequency in Hz the specified band.

Arguments:

Returns:

The center frequency in Hz for the specified band, otherwise KErrArgument if aBand is invalid.

CrossoverFrequency
TInt32 CrossoverFrequency(TUint8 aBand) const;

Gets the cross-over frequency between the given frequency band (aBand) and the next band.

Arguments:

Returns:

The crossover frequency in Hz for the specified band, otherwise KErrArgument if aBand is invalid.

DbLevelLimits
void DbLevelLimits(TUint32& aMin, TUint32& aMax);

Gets the range in mB for the equalizer.

Arguments:

Returns:

None.

NumberOfBands
TUint8 NumberOfBands() const;

Gets the number of equalizer bands.

Arguments:

None.

Returns:

The number of equalizer bands.

SetBandLevelL
void SetBandLevelL(TInt8 aBand, TInt32 aLevel);

Sets the equalizer band level value in mB, ranging from Min to Max.

Arguments:

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

MAudioEqualizerObserver

This abstract class is a generalization of the audio equalizer observer. It defines the possible events that are specific to the audio equalizer effect. It is derived from MAudioEffectObserver (see MAudioEffectObserver section).

Figure 13:  MAudioEqualizerObserver

Methods:

EffectChanged(). Inherited from MAudioEffectObserver (see MAudioEffectObserver section).

CLoudness

This class is used by audio applications for controlling loudness. It is derived from CAudioEffect (see CAudioEffect section).

Figure 14:  CLoudness

Headers:

LoudnessEffect.H, LoudnessEffectData.H, LoudnessEffectObserver.H

Library:

LoudnessEffect.DLL

NewL − factory methods
CLoudness* NewL(CMMFDevSound& aDevSound, TBool aEnable = Efalse);

A static constructor that creates a loudness object.

Arguments:

Returns:

A pointer to a CLoudness object.

Error handling:

This method leaves with the following typical leave codes:

CLoudness* NewL(CMdaAudioConvertUtility& aUtility, TBool aEnable = Efalse);

A static constructor that creates a loudness object.

Arguments:

Returns:

A pointer to a CLoudness object.

Error handling:

This method leaves with the following typical leave codes:

CLoudness* NewL(CMdaAudioInputStream& aUtility, TBool aEnable = EFalse);

A static constructor that creates a loudness object.

Arguments:

Returns:

A pointer to a CLoudness object.

Error handling:

This method leaves with the following typical leave codes:

CLoudness* NewL(CMdaAudioOutputStream& aUtility, TBool aEnable = EFalse);

A static constructor that creates a loudness object.

Arguments:

Returns:

A pointer to a CLoudness object.

Error handling:

This method leaves with the following typical leave codes:

CLoudness* NewL(CMdaAudioPlayerUtility& aUtility, TBool aEnable = EFalse);

A static constructor that creates a loudness object.

Arguments:

Returns:

A pointer to a CLoudness object.

Error handling:

This method leaves with the following typical leave codes:

CLoudness* NewL(CMdaAudioRecordUtility& aUtility, TBool aRecordStream, TBool aEnable = EFalse);

A static constructor that creates a loudness object.

Arguments:

Returns:

A pointer to a CLoudness object.

Error handling:

This method leaves with the following typical leave codes:

CLoudness* NewL(CMdaAudioToneUtility& aUtility, TBool aEnable = EFalse);

A static constructor that creates a loudness object.

Arguments:

Returns:

A pointer to a CLoudness object.

Error handling:

This method leaves with the following typical leave codes:

CLoudness* NewL(MCustomCommand& aUtility, TBool aEnable = EFalse);

A static constructor that creates a loudness object.

Arguments:

Returns:

A pointer to a CLoudness object.

Error handling:

This method leaves with the following typical leave codes:

CLoudness* NewL(MCustomInterface& aCustomInterface, TBool aEnable = EFalse);

A static constructor that creates a loudness object.

Arguments:

Returns:

A pointer to a CLoudness object.

Error handling:

This method leaves with the following typical leave codes:

MLoudnessObserver

This abstract class is a generalization of the loudness observer. It defines the possible events that are specific to the loudness effect. It is derived from MAudioEffectObserver (see MAudioEffectObserver section).

Figure 15:  MLoudnessObserver

Methods:

EffectChanged(). Inherited from MAudioEffectObserver (see MAudioEffectObserver section).

CDistanceAttenuation

This class is used by audio applications for controlling distance attenuation. It is derived from CAudioEffect (see CAudioEffect section).

Figure 16:  CDistanceAttenuation

Headers:

DistanceAttenuationEffect.H, DistanceAttenuationEffectData.H, MdistanceAttenuationEffectObserver.H

Library:

DistanceAttenuationEffect.DLL

NewL − factory methods
CDistanceAttenuation* NewL(CMMFDevSound& aDevSound);

A static constructor that creates a distance attenuation object.

Arguments:

Returns:

A pointer to CDistanceAttenuation.

Error handling:

This method leaves with the following typical leave codes:

CDistance attenuation* NewL(CMdaAudioConvertUtility& aUtility);

A static constructor that creates a distance attenuation object.

Arguments:

Returns:

A pointer to CDistanceAttenuation.

Error handling:

This method leaves with the following typical leave codes:

CDistanceAttenuation* NewL(CMdaAudioInputStream& aUtility);

A static constructor that creates a distance attenuation object.

Arguments:

Returns:

A pointer to CDistanceAttenuation.

Error handling:

This method leaves with the following typical leave codes:

CDistanceAttenuation* NewL(CMdaAudioOutputStream& aUtility);

A static constructor that creates a distance attenuation object.

Arguments:

Returns:

A pointer to CDistanceAttenuation.

Error handling:

This method leaves with the following typical leave codes:

CDistanceAttenuation* NewL(CMdaAudioPlayerUtility& aUtility);

A static constructor that creates a distance attenuation object.

Arguments:

Returns:

A pointer to CDistanceAttenuation.

Error handling:

This method leaves with the following typical leave codes:

CDistanceAttenuation* NewL(CMdaAudioRecordUtility& aUtility, TBool aRecordStream);

A static constructor that creates a distance attenuation object.

Arguments:

Returns:

A pointer to CDistanceAttenuation.

Error handling:

This method leaves with the following typical leave codes:

CDistanceAttenuation* NewL(CMdaAudioToneUtility& aUtility);

A static constructor that creates a distance attenuation object.

Arguments:

Returns:

A pointer to CDistanceAttenuation.

Error handling:

This method leaves with the following typical leave codes:

CDistanceAttenuation* NewL(MCustomCommand& aUtility);

A static constructor that creates a distance attenuation object.

Arguments:

Returns:

A pointer to CDistanceAttenuation.

Error handling:

This method leaves with the following typical leave codes:

DistanceAttenuation
void DistanceAttenuation(TInt32& aRMin, TInt32& aRMax, TBool& aMuteAfterMax, TUint32& aRollOffFactor, TUint32& aRoomRollOffFactor);

Gets the distance attenuation parameters. The referenced memory will contain the value.

Arguments:

Returns:

None.

RollOffFactorMax
void RollOffFactorMax(TUint32& aRollOfFactorMax);

Gets the roll off factor maximum value. The referenced memory will contain the value.

Arguments:

Returns:

None.

RoomRollOffFactorMax
void RollOffFactorMax(TUint32& aRoomRollOffFactorMax);

Gets the roll off factor maximum value. The referenced memory will contain the value.

Arguments:

Returns:

None.

SetDistanceAttenuationL
void SetDistanceAttenuationL(TInt32 aRMin, TInt32 aRMax, TBool aMuteAfterMax, TUint32 aRollOffFactor, TUint32 aRoomRollOffFactor);

Sets the distance attenuation parameters.

Arguments:

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

MDistanceAttenuationObserver

This abstract class is a generalization of the distance attenuation observer. It defines the possible events that are specific to the distance attenuation effect. It is derived from MAudioEffectObserver (see MAudioEffectObserver section).

Figure 17:  MDistanceAttenuationObserver

Methods:

EffectChanged(). Inherited from MAudioEffectObserver (see MAudioEffectObserver section).

CLocation

This abstract class defines the methods needed for all location effects. It is derived from CAudioEffect (see CAudioEffect section).

Figure 18:  CLocation

Headers:

LocationBase.H

Library:

LocationEffect.DLL

LocationCartesian
void LocationCartesian(TInt32& aX, TInt32& aY, TInt32& aZ);

Gets the Cartesian coordinates for the location of the position.

Arguments:

Returns:

None.

LocationSpherical
void LocationSpherical(TInt32& aAzimuth, TInt32& aElevation, TInt32& aRadius);

Gets the spherical coordinates for the location of the position.

Arguments:

Returns:

None.

SetLocationCartesianL
void SetLocationCartesianL(TInt32 aX, TInt32 aY, TInt32 aZ);

Sets the Cartesian coordinates for the location of the position.

Arguments:

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

SetLocationSphericalL
void SetLocationSphericalL(TInt32 aAzimuth, TInt32 aElevation, TInt32 aRadius);

Sets the spherical coordinates for the location of the position.

Arguments:

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

MLocationObserver

This abstract class is a generalization of the location observer. It defines the possible events that are specific to the location effect. It is derived from MAudioEffectObserver (see MAudioEffectObserver section).

Figure 19:  MLocationObserver

Methods:

EffectChanged(). Inherited from MAudioEffectObserver (see MAudioEffectObserver section).

CListenerLocation

This class is used by audio applications for controlling the audio listener’s location. This should only be used for applications needing 3D audio, and may be limited by the system. It is derived from CLocation (see CLocation section).

Figure 20:  CListenerLocation

Headers:

ListenerLocationEffect.H, ListenerLocationEffectData.H, MListenerLocationEffectObserver.H

Library:

ListenerLocationEffect.DLL

NewL − factory methods
CListenerLocation* NewL(CMMFDevSound& aDevSound);

A static constructor that creates a listener location object.

Arguments:

Returns:

A pointer to CListenerLocation.

Error handling:

This method leaves with the following typical leave codes:

CListenerLocation* NewL(CMdaAudioConvertUtility& aUtility);

A static constructor that creates a doppler object.

Arguments:

Returns:

A pointer to CListenerLocation.

Error handling:

This method leaves with the following typical leave codes:

CListenerLocation* NewL(CMdaAudioInputStream& aUtility);

A static constructor that creates a listener location object.

Arguments:

Returns:

A pointer to CListenerLocation.

Error handling:

This method leaves with the following typical leave codes:

CListenerLocation* NewL(CMdaAudioOutputStream& aUtility);

A static constructor that creates a listener location object.

Arguments:

Returns:

A pointer to CListenerLocation.

Error handling:

This method leaves with the following typical leave codes:

CListenerLocation* NewL(CMdaAudioPlayerUtility& aUtility);

A static constructor that creates a listener location object.

Arguments:

Returns:

A pointer to CListenerLocation.

Error handling:

This method leaves with the following typical leave codes:

CListenerLocation* NewL(CMdaAudioRecordUtility& aUtility, TBool aRecordStream);

A static constructor that creates a listener location object.

Arguments:

Returns:

A pointer to CListenerLocation.

Error handling:

This method leaves with the following typical leave codes:

CListenerLocation* NewL(CMdaAudioToneUtility& aUtility);

A static constructor that creates a listener location object.

Arguments:

Returns:

A pointer to CListenerLocation.

Error handling:

This method leaves with the following typical leave codes:

CListenerLocation* NewL(MCustomCommand& aUtility);

A static constructor that creates a listener location object.

Arguments:

Returns:

A pointer to CListenerLocation.

Error handling:

This method leaves with the following typical leave codes:

CListenerLocation* NewL(MCustomInterface& aCustomInterface);

A static constructor that creates a listener location object.

Arguments:

Returns:

A pointer to CListenerLocation.

Error handling:

This method leaves with the following typical leave codes:

MListenerLocationObserver

This abstract class is a generalization of the listener location observer. It defines the possible events that are specific to the listener location effect. It is derived from MLocationObserver (see MLocationObserver section).

Figure 21:  MListenerLocationObserver

Methods:

EffectChanged(). Inherited from MAudioEffectObserver (see MAudioEffectObserver section).

CSourceLocation

This class is used by audio applications for controlling the audio source’s location. This should only be used for applications needing 3D audio, and may be limited by the system. It is derived from CLocation (see CLocation section).

Figure 22:  CSourceLocation

Headers:

SourceLocationEffect.H, SourceLocationEffectData.H, MSourceLocationEffectObserver.H

Library:

SourceLocationEffect.DLL

NewL − factory methods
CSourceLocation* NewL(CMMFDevSound& aDevSound);

A static constructor that creates a listener location object.

Arguments:

Returns:

A pointer to CSourceLocation.

Error handling:

This method leaves with the following typical leave codes:

CSourceLocation* NewL(CMdaAudioConvertUtility& aUtility);

A static constructor that creates a source location object.

Arguments:

Returns:

A pointer to CSourceLocation.

Error handling:

This method leaves with the following typical leave codes:

CSourceLocation* NewL(CMdaAudioInputStream& aUtility);

A static constructor that creates a source location object.

Arguments:

Returns:

A pointer to CSourceLocation.

Error handling:

This method leaves with the following typical leave codes:

CSourceLocation* NewL(CMdaAudioOutputStream& aUtility);

A static constructor that creates a source location object.

Arguments:

Returns:

A pointer to CSourceLocation.

Error handling:

This method leaves with the following typical leave codes:

CSourceLocation* NewL(CMdaAudioPlayerUtility& aUtility);

A static constructor that creates a source location object.

Arguments:

Returns:

A pointer to CSourceLocation.

Error handling:

This method leaves with the following typical leave codes:

CSourceLocation* NewL(CMdaAudioRecordUtility& aUtility, TBool aRecordStream);

A static constructor that creates a source location object.

Arguments:

Returns:

A pointer to CSourceLocation.

Error handling:

This method leaves with the following typical leave codes:

CSourceLocation* NewL(CMdaAudioToneUtility& aUtility);

A static constructor that creates a source location object.

Arguments:

Returns:

A pointer to CSourceLocation.

Error handling:

This method leaves with the following typical leave codes:

CSourceLocation* NewL(MCustomCommand& aUtility);

A static constructor that creates a source location object.

Arguments:

Returns:

A pointer to CSourceLocation.

Error handling:

This method leaves with the following typical leave codes:

CSourceLocation* NewL(MCustomInterface& aCustomInterface);

A static constructor that creates a source location object.

Arguments:

Returns:

A pointer to CSourceLocation.

Error handling:

This method leaves with the following typical leave codes:

MSourceLocationObserver

This abstract class is a generalization of the source location observer. It defines the possible events that are specific to the source location effect. It is derived from MLocationObserver (see MLocationObserver section).

Figure 23:  MSourceLocationObserver

Methods:

EffectChanged(). Inherited from MAudioEffectObserver (see MAudioEffectObserver section).

COrientation

This abstract class defines the methods needed for all location effects. It is derived from CAudioEffect (see CAudioEffect section).

Figure 24:  COrientation

Headers:

OrientationBase.H

Library:

OrientationEffect.DLL

Orientation
void Orientation(TInt32& aHeading, TInt32& aPitch, TInt32& aRoll);

Gets the orientation values for the position.

Arguments:

Returns:

None.

OrientationVectors
void OrientationVectors(TInt32& aFrontX, TInt32& aFrontY, TInt32& aFrontZ, TInt32& aAboveX, TInt32& aAboveY, TInt32& aAboveZ);

Gets the orientation vectors for the position.

Arguments:

Returns:

None.

SetOrientationL
void SetOrientationL(TInt32 aHeading, TInt32 aPitch, TInt32 aRoll);

Sets the orientation values for the position.

Arguments:

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

SetOrientationVectorsL
void SetOrientationVectorsL(TInt32 aFrontX, TInt32 aFrontY, TInt32 aFrontZ, TInt32 aAboveX, TInt32 aAboveY, TInt32 aAboveZ);

Gets the orientation vectors for the position.

Arguments:

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

MOrientationObserver

This abstract class is a generalization of the orientation observer. It defines the possible events that are specific to the orientation effect. It is derived from MAudioEffectObserver (see MAudioEffectObserver section).

Figure 25:  MOrientationObserver

Methods:

EffectChanged(). Inherited from MAudioEffectObserver (see MAudioEffectObserver section).

CListenerOrientation

This class is used by audio applications for controlling the listener orientation. This should only be used for applications needing 3D audio, and may be limited by the system. It is derived from COrientation (see COrientation section).

Figure 26:  CListenerOrientation

Headers:

ListenerOrientationEffect.H, ListenerOrientationEffectData.H, MListenerOrientationEffectObserver.H

Library:

OrientationLocationEffect.DLL

NewL − factory methods
CListenerOrientation* NewL(CMMFDevSound& aDevSound);

A static constructor that creates a listener orientation object.

Arguments:

Returns:

A pointer to CListenerOrientation.

Error handling:

This method leaves with the following typical leave codes:

CListenerOrientation* NewL(CMdaAudioConvertUtility& aUtility);

A static constructor that creates a listener orientation object.

Arguments:

Returns:

A pointer to CListenerOrientation.

Error handling:

This method leaves with the following typical leave codes:

CListenerOrientation* NewL(CMdaAudioInputStream& aUtility);

A static constructor that creates a listener orientation object.

Arguments:

Returns:

A pointer to CListenerOrientation.

Error handling:

This method leaves with the following typical leave codes:

CListenerOrientation* NewL(CMdaAudioOutputStream& aUtility);

A static constructor that creates a listener orientation object.

Arguments:

Returns:

A pointer to CListenerOrientation.

Error handling:

This method leaves with the following typical leave codes:

CListenerOrientation* NewL(CMdaAudioPlayerUtility& aUtility);

A static constructor that creates a listener orientation object.

Arguments:

Returns:

A pointer to CListenerOrientation.

Error handling:

This method leaves with the following typical leave codes:

CListenerOrientation* NewL(CMdaAudioRecordUtility& aUtility, TBool aRecordStream);

A static constructor that creates a listener orientation object.

Arguments:

Returns:

A pointer to CListenerOrientation.

Error handling:

This method leaves with the following typical leave codes:

CListenerOrientation* NewL(CMdaAudioToneUtility& aUtility);

A static constructor that creates a listener orientation object.

Arguments:

Returns:

A pointer to CListenerOrientation.

Error handling:

This method leaves with the following typical leave codes:

CListenerOrientation* NewL(MCustomCommand& aUtility);

A static constructor that creates a listener orientation object.

Arguments:

Returns:

A pointer to CListenerOrientation.

Error handling:

This method leaves with the following typical leave codes:

CListenerOrientation* NewL(MCustomInterface& aCustomInterface);

A static constructor that creates a listener orientation object.

Arguments:

Returns:

A pointer to CListenerOrientation.

Error handling:

This method leaves with the following typical leave codes:

MListenerOrientationObserver

This abstract class is a generalization of the listener orientation observer. It defines the possible events that are specific to the listener orientation effect. It is derived from MOrientationObserver (see MOrientationObserver section).

Figure 27:  MListenerOrientationObserver

Methods:

EffectChanged(). Inherited from MAudioEffectObserver (see MAudioEffectObserver section).

CSourceOrientation

This class is used by audio applications for controlling the source orientation. This should only be used for applications needing 3D audio, and may be limited by the system. It is derived from COrientation (see COrientation section).

Figure 28:  CSourceOrientation

Headers:

SourceOrientationEffect.H, SourceOrientationEffectData.H, MSourceOrientationEffectObserver.H

Library:

SourceOrientationEffect.DLL

NewL factory methods
CSourceOrientation* NewL(CMMFDevSound& aDevSound);

A static constructor that creates a source orientation object.

Arguments:

Returns:

A pointer to CSourceOrientation.

Error handling:

This method leaves with the following typical leave codes:

CSourceOrientation* NewL(CMdaAudioConvertUtility& aUtility);

A static constructor that creates a source orientation object.

Arguments:

Returns:

A pointer to CSourceOrientation.

Error handling:

This method leaves with the following typical leave codes:

CSourceOrientation* NewL(CMdaAudioInputStream& aUtility);

A static constructor that creates a source orientation object.

Arguments:

Returns:

A pointer to CSourceOrientation.

Error handling:

This method leaves with the following typical leave codes:

CSourceOrientation* NewL(CMdaAudioOutputStream& aUtility);

A static constructor that creates a source orientation object.

Arguments:

Returns:

A pointer to CSourceOrientation.

Error handling:

This method leaves with the following typical leave codes:

CSourceOrientation* NewL(CMdaAudioPlayerUtility& aUtility);

A static constructor that creates a source orientation object.

Arguments:

Returns:

A pointer to CSourceOrientation.

Error handling:

This method leaves with the following typical leave codes:

CSourceOrientation* NewL(CMdaAudioRecordUtility& aUtility, TBool aRecordStream);

A static constructor that creates a source orientation object.

Arguments:

Returns:

A pointer to CSourceOrientation.

Error handling:

This method leaves with the following typical leave codes:

CSourceOrientation* NewL(CMdaAudioToneUtility& aUtility);

A static constructor that creates a source orientation object.

Arguments:

Returns:

A pointer to CSourceOrientation.

Error handling:

This method leaves with the following typical leave codes:

CSourceOrientation* NewL(MCustomCommand& aUtility);

A static constructor that creates a source orientation object.

Arguments:

Returns:

A pointer to CSourceOrientation.

Error handling:

This method leaves with the following typical leave codes:

CSourceOrientation* NewL(MCustomInterface& aCustomInterface);

A static constructor that creates a source orientation object.

Arguments:

Returns:

A pointer to CSourceOrientation.

Error handling:

This method leaves with the following typical leave codes:

MSourceOrientationObserver

This abstract class is a generalization of the source orientation observer. It defines the possible events that are specific to the source orientation effect. It is derived from MOrientationObserver (see MOrientationObserver section).

Figure 29:  MSourceOrientationObserver

Methods:

EffectChanged(). Inherited from MAudioEffectObserver (see MAudioEffectObserver section).

CEnvironmentalReverb

This class is used by audio applications for controlling environmental reverb. It is derived from CAudioEffect (see CAudioEffect section).

Figure 30:  CEnvironmentalReverb

Headers:

EnvironmentalReverbEffect.H, EnvironmentalReverbEffectData.H, MEnvironmentalReverbEffectObserver.H

Library:

EnvironmentalReverbEffect.DLL

NewL − factory methods
CEnvironmentalReverb* NewL(CMMFDevSound& aDevSound);

A static constructor that creates a reverb object.

Arguments:

Returns:

A pointer to CEnvironmentalReverb.

Error handling:

This method leaves with the following typical leave codes:

CEnvironmentalReverb* NewL(CMdaAudioConvertUtility& aUtility);

A static constructor that creates a reverb object.

Arguments:

Returns:

A pointer to CEnvironmentalReverb.

Error handling:

This method leaves with the following typical leave codes:

CEnvironmentalReverb* NewL(CMdaAudioInputStream& aUtility);

A static constructor that creates a reverb object.

Arguments:

Returns:

A pointer to CEnvironmentalReverb.

Error handling:

This method leaves with the following typical leave codes:

CEnvironmentalReverb* NewL(CMdaAudioOutputStream& aUtility);

A static constructor that creates a reverb object.

Arguments:

Returns:

A pointer to CEnvironmentalReverb.

Error handling:

This method leaves with the following typical leave codes:

CEnvironmentalReverb* NewL(CMdaAudioPlayerUtility& aUtility);

A static constructor that creates a reverb object.

Arguments:

Returns:

A pointer to CEnvironmentalReverb.

Error handling:

This method leaves with the following typical leave codes:

CEnvironmentalReverb* NewL(CMdaAudioRecordUtility& aUtility, TBool aRecordStream);

A static constructor that creates a reverb object.

Arguments:

Returns:

A pointer to CEnvironmentalReverb.

Error handling:

This method leaves with the following typical leave codes:

CEnvironmentalReverb* NewL(CMdaAudioToneUtility& aUtility);

A static constructor that creates a reverb object.

Arguments:

Returns:

A pointer to CEnvironmentalReverb.

Error handling:

This method leaves with the following typical leave codes:

CEnvironmentalReverb* NewL(MCustomCommand& aUtility);

A static constructor that creates a reverb object.

Arguments:

Returns:

A pointer to CEnvironmentalReverb.

Error handling:

This method leaves with the following typical leave codes:

CEnvironmentalReverb* NewL(MCustomInterface& aCustomInterface);

A static constructor that creates a reverb object.

Arguments:

Returns:

A pointer to CEnvironmentalReverb.

Error handling:

This method leaves with the following typical leave codes:

DecayHFRatio
TUint32 DecayHfRatio() const;

Gets the decay HF Ratio in hundredths.

Arguments:

None.

Returns:

The decay HF Ratio in hundredths.

DecayHFRatioRange
void DecayHFRatioRange(TUint32& aMin, TUint32& aMax);

Gets the reverb decay HF Ratio minimum and maximum in hundredths.

Arguments:

Returns:

None.

DecayTime
TUint32 DecayTime() const;

Gets the decay time in milliseconds.

Arguments:

None.

Returns:

The decay time in milliseconds.

DecayTimeRange
void DecayTimeRange(TUint32& aMin, TUint32& aMax);

Gets the allowable reverb decay time range in milliseconds.

Arguments:

Returns:

The decay time maximum in milliseconds.

DelayMax
TUint32 DelayMax() const;

Gets the maximum decay time in milliseconds. ReverbDelayMax() or the ReflectionsDelayMax() must be <= DelayMax(). Also ReflectionsDelayMax() should be less than ReverbDelayMax()

Arguments:

Returns:

The maximum delay time in milliseconds.

Density
TUint32 Density() const;

Gets the current density value as a percentage in hundredths.

Arguments:

None.

Returns:

The density percentage in hundredths.

Diffusion
TUint32 Diffusion() const;

Gets the current diffusion value as a percentage in hundredths.

Arguments:

None.

Returns:

The diffusion percentage in hundredths.

ReflectionsDelay
TUint32 RefectionsDelay() const;

Gets the reverb reflections delay in milliseconds.

Arguments:

None.

Returns:

The reflections delay in milliseconds.

ReflectionsDelayMax
TUint32 ReflectionsDelayMax() const;

Gets the reverb reflections delay maximum in milliseconds.

Arguments:

None.

Returns:

The delay maximum in milliseconds.

ReflectionsLevel
TInt32 ReflectionsLevel() const;

Gets the reverb reflections level in mB.

Arguments:

None.

Returns:

The reverb reflections level in mB.

ReflectionsLevelRange
void ReflectionsLevelRange(TInt32& aMin, TInt32& aMax);

Gets the reverb reflections level in mB.

Arguments:

Returns:

None.

ReverbDelay
TUint32 ReverbDelay() const;

Gets the reverb delay in milliseconds.

Arguments:

None.

Returns:

The reverb delay in milliseconds.

ReverbDelayMax
TUint32 ReverbDelayMax() const;

Gets the reverb delay maximum in milliseconds.

Arguments:

None.

Returns:

The reverb delay maximum in milliseconds.

ReverbLevel
TInt32 ReverbLevel() const;

Gets the current reverb level in mB.

Arguments:

None.

Returns:

The current reverb level.

ReverbLevelRange
void ReverbLevelRange(TInt32& aMin, TInt32& aMax);

Gets the current reverb level maximum and minimum in mB.

Arguments:

Returns:

None.

RoomHFLevel
TInt32 RoomHFLevel() const;

Gets the current room High Frequency level value in mB.

Arguments:

None.

Returns:

The current room High Frequency level ratio.

RoomHFLevelRange
void RoomHFLevelRange(TInt32& aMin, TInt32& aMax);

Gets the room High Frequency level maximum and minimum ratios in mB.

Arguments:

Returns:

None.

RoomLevel
TInt32 RoomLevel() const;

Gets the current room level ratio in mB.

Arguments:

None.

Returns:

The room level ratio.

RoomLevelRange
void RoomLevelRange(TInt32& aMin, TInt32& aMax);

Gets the room level maximum and minimum ratios in mB.

Arguments:

Returns:

None.

SetDecayTimeL
void SetDecayTimeL(TUint32 aDecayTime);

Sets the decay time in milliseconds.

Arguments:

TUint32 aDecayTime: The decay time in milliseconds.

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

SetDecayHFRatioL
void SetDecayHFRatioL(TUint32 aDecayHFRatio);

Sets the decay HF Ratio in hundredths.

Arguments:

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

SetDensityL
void SetDensityL(TUint32 aDensity);

Sets the density value as percentage in hundredths.

Arguments:

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

SetDiffusionL
void SetDiffusionL(TUint32 aDiffusion);

Sets the diffusion value as a percentage in hundredths.

Arguments:

TUint32 aDiffusion: The diffusion.

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

SetReflectionsDelayL
void SetReflectionsDelayL(TUint32 aRefectionsDelay);

Sets the reverb reflections delay.

Arguments:

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

SetReflectionsLevelL
void SetReflectionsLevelL(TInt32 aRefectionsLevel);

Sets the reverb reflections level in mB.

Arguments:

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

SetReverbDelayL
void SetReverbDelayL(TUint32 aReverbDelay);

Sets the reverb delay.

Arguments:

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

SetReverbLevelL
void SetReverbLevelL(TInt32 aReverbLevel);

Sets the reverb level.

Arguments:

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

SetRoomHfLevelL
void SetRoomHFLevelL(TInt32 aRoomHFLevel);

Sets the room HF level in mB.

Arguments:

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

SetRoomLevelL
void SetRoomLevelL(TInt32 aRoomLevel);

Sets the room level in mB.

Arguments:

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

MEnvironmentalReverbObserver

This abstract class is a generalization of the environmental reverb observer. It defines the possible events that are specific to the environmental reverb effect. It is derived from MAudioEffectObserver (see MAudioEffectObserver section).

Figure 31:  MEnvironmentalReverbObserver

Methods:

EffectChanged(). Inherited from MAudioEffectObserver (see MAudioEffectObserver section).

CStereoWidening

This class is used by audio applications for controlling stereo widening. It is derived from CAudioEffect (see CAudioEffect section).

Figure 32:  CStereoWidening

Headers:

StereoWideningEffect.H, StereoWideningEffectData.H, MStereoWideningEffectObserver.H

Library:

StereoWideningEffect.DLL

NewL − factory methods
CStereoWidening* NewL(CMMFDevSound& aDevSound, TBool aEnable = EFalse, TInt8 aInitialLevel = 0);

A static constructor that creates a stereo widening object.

Arguments:

Returns:

A pointer to CStereoWidening.

Error handling:

This method leaves with the following typical leave codes:

CStereoWidening* NewL(CMdaAudioConvertUtility& aUtility, TBool aEnable = EFalse, TInt8 aInitialLevel = 0 );

A static constructor that creates a stereo widening object.

Arguments:

Returns:

A pointer to CStereoWidening.

Error handling:

This method leaves with the following typical leave codes:

CStereoWidening* NewL(CMdaAudioInputStream& aUtility, TBool aEnable = EFalse, TInt8 aInitialLevel = 0 );

A static constructor that creates a stereo widening object.

Arguments:

Returns:

A pointer to CStereoWidening.

Error handling:

This method leaves with the following typical leave codes:

CStereoWidening* NewL(CMdaAudioOutputStream& aUtility, TBool aEnable = EFalse, TInt8 aInitialLevel = 0 );

A static constructor that creates a stereo widening object.

Arguments:

Returns:

Pointer to CStereoWidening

Error handling:

This method leaves with the following typical leave codes:

CStereoWidening* NewL(CMdaAudioPlayerUtility& aUtility, TBool aEnable = EFalse, TInt8 aInitialLevel = 0 );

A static constructor that creates a stereo widening object.

Arguments:

Returns:

A pointer to CStereoWidening.

Error handling:

This method leaves with the following typical leave codes:

CStereoWidening* NewL(CMdaAudioRecordUtility& aUtility, Tbool aRecordStream, TBool aEnable = EFalse, TInt8 aInitialLevel = 0 );

A static constructor that creates a stereo widening object.

Arguments:

Returns:

A pointer to CStereoWidening.

Error handling:

This method leaves with the following typical leave codes:

CStereoWidening* NewL(CMdaAudioToneUtility& aUtility, TBool aEnable = EFalse, TInt8 aInitialLevel = 0 );

A static constructor that creates a stereo widening object.

Arguments:

Returns:

A pointer to CStereoWidening.

Error handling:

This method leaves with the following typical leave codes:

CStereoWidening* NewL(MCustomCommand& aUtility, TBool aEnable = EFalse, TInt8 aInitialLevel = 0 );

A static constructor that creates a stereo widening object.

Arguments:

Returns:

A pointer to CStereoWidening.

Error handling:

This method leaves with the following typical leave codes:

CStereoWidening* NewL(MCustomInterface& aCustomInterface, TBool aEnable = EFalse, TInt8 aInitialLevel = 0 );

A static constructor that creates a stereo widening object.

Arguments:

Returns:

A pointer to CStereoWidening.

Error handling:

This method leaves with the following typical leave codes:

IsContinousLevelSupported
TBool IsContinousLevelSupported() const;

Checks if continuous level is supported for stereo widening.

Arguments:

None.

Returns:

ETrue if continuous level is supported for stereo widening. If this returns EFalse, then the adaptation is actually setting the level to the nearest supported discrete value when SetStereoWidenlingLevelL is called.

SetStereoWideningLevelL
void SetStereoWideningLevelL(TUint8 aLevel);

Sets the widening level.

Arguments:

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

StereoWideningLevel
TUint8 SteroWideningLevel() const;

Gets the stereo widening settings.

Arguments:

None.

Returns:

The level of widening.

MStereoWideningObserver

This abstract class is a generalization of the stereo widening observer. It defines the possible events that are specific to the stereo widening effect. It is derived from MAudioEffectObserver (see MAudioEffectObserver section).

Figure 33:  MStereoWideningObserver

Methods:

EffectChanged(). Inherited from MAudioEffectObserver (see MAudioEffectObserver section).

Equalizer Utility

Equalizer Utility enables audio clients to use preset values stored in the Central Repository for use with the Equalizer effect.

Figure 34:  Equalizer Utility

Headers:

AudioEqualizerUtility.H

Library:

AudioEqualizerUtility.DLL

NewL − factory methods
CAudioEqualizerUtility* NewL(CMMFDevSound& aDevSound);

A static constructor that creates an audio equalizer utility object.

Arguments:

Returns:

A pointer to CAudioEqualizerUtility.

Error handling:

This method leaves with the following typical leave codes:

CAudioEqualizerUtility* NewL(CMdaAudioConvertUtility& aUtility);

A static constructor that creates an audio equalizer utility object.

Arguments:

Returns:

A pointer to CAudioEqualizerUtility.

Error handling:

This method leaves with the following typical leave codes:

CAudioEqualizerUtility* NewL(CMdaAudioInputStream& aUtility);

A static constructor that creates an audio equalizer utility object.

Arguments:

Returns:

A pointer to CAudioEqualizerUtility.

Error handling:

This method leaves with the following typical leave codes:

CAudioEqualizerUtility* NewL(CMdaAudioOutputStream& aUtility);

A static constructor that creates an audio equalizer utility object.

Arguments:

Returns:

A pointer to CAudioEqualizerUtility.

Error handling:

This method leaves with the following typical leave codes:

CAudioEqualizerUtility* NewL(CMdaAudioPlayerUtility& aUtility);

A static constructor that creates an audio equalizer utility object.

Arguments:

Returns:

A pointer to CAudioEqualizerUtility.

Error handling:

This method leaves with the following typical leave codes:

CAudioEqualizerUtility* NewL(CMdaAudioRecordUtility& aUtility);

A static constructor that creates an audio equalizer utility object.

Arguments:

Returns:

A pointer to CAudioEqualizerUtility.

Error handling:

This method leaves with the following typical leave codes:

CAudioEqualizerUtility* NewL(CMdaAudioToneUtility& aUtility);

A static constructor that creates an audio equalizer utility object.

Arguments:

Returns:

A pointer to CAudioEqualizerUtility.

Error handling:

This method leaves with the following typical leave codes:

CAudioEqualizerUtility* NewL(MCustomCommand& aUtility);

A static constructor that creates an audio equalizer utility object.

Arguments:

Returns:

A pointer to CAudioEqualizerUtility.

Error handling:

This method leaves with the following typical leave codes:

CAudioEqualizerUtility* NewL(MCustomInterface& aCustomInterface);

A static constructor that creates an audio equalizer utility object.

Arguments:

Returns:

A pointer to CAudioEqualizerUtility.

Error handling:

This method leaves with the following typical leave codes:

ApplyPresetL
void ApplyPresetL(TInt aPresetIndex);

Used to apply the preset values.

Arguments:

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

BassBoost
CbassBoost& BassBoost();

Gets the bass boost object.

Arguments:

None.

Returns:

A reference to the bass boost object.

CreatePresetL
void CreatePresetL(TDesC& aName, CAudioEqualizer& aAudioEqualizer);

Creates a user-defined preset with the specified equalizer settings.

Arguments:

Returns:

An updated list of presets is returned if the operation is successful.

Error handling:

This method leaves with the following typical leave codes:

DeletePresetL
void DeletePresetL(TInt aPresetIndex);

Deletes the specified user-defined preset.

Arguments:

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

DisableEqualizerL
void DisableEqualizerL ();

Deletes the specified user-defined preset.

Arguments:

Returns:

None.

Error handling:

Equalizer
CAudioEqualizer& Equalizer();

Gets the audio equalizer object.

Arguments:

None.

Returns:

A reference to the audio equalizer object.

GetPresetL
const TDesC& GetPresetL (TInt aPresetIndex);

Retrieves the Preset values from the Central Repository and stores it in the Equalizer Object. Also it returns the Name of the retrieved Preset.

Arguments:

Returns:

Name of the Retrieved Preset.

Error handling:

This method leaves with the following typical leave codes:

ModifyPresetL
void ModifyPresetL(TInt aPresetIndex, TDesC& aName, CAudioEqualizer& aAudioEqualizer);

Modifies a user-defined preset with the specified equalizer settings.

Arguments:

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

NumberOfPreDefinedPresets
TUint32 NumberOfPreDefinePresets() const;

Gets the number of predefined presets.

Arguments:

None.

Returns:

The number of predefined presets.

Presets
TArray< TEfAudioEqualizerUtilityPreset > Presets();

Gets the list of preset names, unique name keys and unique description keys.

Arguments:

None.

Returns:

An array of objects, which contains all the preset names (pre-defined and user-defined), their name keys and description keys. The pre-defined presets are in the beginning of the list.

ResetPresetL()
void ResetPresetL(TInt aPresetIndex);

Resets the specified preset.

Arguments:

Note: If the preset index points to a preset that cannot be reset, the method will leave with KErrArgument.

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

Reverb Utility

Reverb Utility enables audio clients to use preset values stored in the Central Repository for use with the Reverb effect.

Figure 35:  Reverb Utility

Headers:

ReverbUtility.H

Library:

ReverbUtility.DLL

NewL factory methods
CReverbUtility* NewL(CMMFDevSound& aDevSound);

A static constructor that creates a reverb utility object.

Arguments:

Returns:

A pointer to CReverbUtility.

Error handling:

This method leaves with the following typical leave codes:

CReverbUtility* NewL(CMdaAudioConvertUtility& aUtility);

A static constructor that creates a reverb utility object.

Arguments:

Returns:

A pointer to CReverbUtility.

Error handling:

This method leaves with the following typical leave codes:

CReverbUtility* NewL(CMdaAudioInputStream& aUtility);

A static constructor that creates a reverb utility object.

Arguments:

Returns:

A pointer to CReverbUtility.

Error handling:

This method leaves with the following typical leave codes:

CReverbUtility* NewL(CMdaAudioOutputStream& aUtility);

A static constructor that creates a reverb utility object.

Arguments:

Returns:

A pointer to CReverbUtility.

Error handling:

This method leaves with the following typical leave codes:

CReverbUtility* NewL(CMdaAudioPlayerUtility& aUtility);

A static constructor that creates a reverb utility object.

Arguments:

Returns:

A pointer to CReverbUtility.

Error handling:

This method leaves with the following typical leave codes:

CReverbUtility* NewL(CMdaAudioRecordUtility& aUtility);

A static constructor that creates a reverb utility object.

Arguments:

Returns:

A pointer to CReverbUtility.

Error handling:

This method leaves with the following typical leave codes:

CReverbUtility* NewL(CMdaAudioToneUtility& aUtility);

A static constructor that creates a reverb utility object.

Arguments:

Returns:

A pointer to CReverbUtility.

Error handling:

This method leaves with the following typical leave codes:

CReverbUtility* NewL(MCustomCommand& aUtility);

A static constructor that creates a reverb utility object.

Arguments:

Returns:

A pointer to CReverbUtility.

Error handling:

This method leaves with the following typical leave codes:

CReverbUtility* NewL(MCustomInterface& aCustomInterface);

A static constructor that creates a reverb utility object.

Arguments:

Returns:

A pointer to CReverbUtility.

Error handling:

This method leaves with the following typical leave codes:

ApplyPresetL
void ApplyPresetL(TInt aPresetIndex);

Used to apply the preset values.

Arguments:

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

CreatePresetL
void CreatePresetL(TDesC& aName, CEnvironmentalReverb& aReverb);

Creates a user-defined preset with the specified equalizer settings.

Arguments:

Returns:

An updated list of presets is returned if the operation is successful.

Error handling:

This method leaves with the following typical leave codes:

DeletePresetL
void DeletePresetL(TInt aPresetIndex);

Deletes the specified preset.

Arguments:

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

DisableReverbL
void DisableReverbL ();

Deletes the specified user-defined preset.

Arguments:

Returns:

None.

Error handling:

GetPresetL
const TDesC& GetPresetL (TInt aPresetIndex);

Retrieves the Preset values from the Central Repository and stores it in the Equalizer Object. Also it returns the Name of the retrieved Preset.

Arguments:

Returns:

Name of the Retrieved Preset.

Error handling:

This method leaves with the following typical leave codes:

ModifyPresetL
void ModifyPresetL(TInt aPresetIndex, TDesC& aName, CEnvironmentalReverb& aReverb);

Modifies a user-defined preset with the specified equalizer settings.

Arguments:

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

NumberOfPreDefinedPresets
TUint32 NumberOfPreDefinePresets() const;

Gets the number of predefined presets.

Arguments:

None.

Returns:

The number of predefined presets.

Presets
TArray<TEfAudioReverbUtilityPreset> Presets();

Gets the list of preset names.

Arguments:

None.

Returns:

An array of all the preset names (pre-defined and user-defined). The pre-defined presets are in the beginning of the list.

ResetPresetL()
void ResetPresetL(TInt aPresetIndex);

Resets the specified preset.

Arguments:

Note: If the preset index points to a preset that cannot be reset, the method will leave with KErrArgument.

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

Reverb
CEnvironmentalReverb& Reverb();

Gets the reverb object.

Arguments:

None.

Returns:

A reference to an environmental reverb object.

Stereo Widening Utility

Stereo Widening Utility enables audio clients to use preset values stored in the Central Repository for use with the Stereo Widening effect.

Figure 36:  Stereo Widening Utility

Headers:

StereoWideningUtility.H

Library:

StereoWideningUtility.DLL

NewL − factory methods
CStereoWidening* NewL(CMMFDevSound& aDevSound);

A static constructor that creates a stereo widening utility object.

Arguments:

Returns:

A pointer to CStereoWidening.

Error handling:

This method leaves with the following typical leave codes:

CStereoWidening* NewL(CMdaAudioConvertUtility& aUtility);

A static constructor that creates a stereo widening utility object.

Arguments:

Returns:

A pointer to CStereoWidening.

Error handling:

This method leaves with the following typical leave codes:

CStereoWidening* NewL(CMdaAudioInputStream& aUtility);

A static constructor that creates a stereo widening utility object.

Arguments:

Returns:

A pointer to CStereoWidening.

Error handling:

This method leaves with the following typical leave codes:

CStereoWidening* NewL(CMdaAudioOutputStream& aUtility);

A static constructor that creates a stereo widening utility object.

Arguments:

Returns:

A pointer to CStereoWidening.

Error handling:

This method leaves with the following typical leave codes:

CStereoWidening* NewL(CMdaAudioPlayerUtility& aUtility);

A static constructor that creates a stereo widening utility object.

Arguments:

Returns:

A pointer to CStereoWidening.

Error handling:

This method leaves with the following typical leave codes:

CStereoWidening* NewL(CMdaAudioRecordUtility& aUtility);

A static constructor that creates a stereo widening utility object.

Arguments:

Returns:

A pointer to CStereoWidening.

Error handling:

This method leaves with the following typical leave codes:

CStereoWidening* NewL(CMdaAudioToneUtility& aUtility);

A static constructor that creates a stereo widening utility object.

Arguments:

Returns:

A pointer to CStereoWidening.

Error handling:

This method leaves with the following typical leave codes:

CStereoWidening* NewL(MCustomCommand& aUtility);

A static constructor that creates a stereo widening utility object.

Arguments:

Returns:

A pointer to CStereoWidening.

Error handling:

This method leaves with the following typical leave codes:

CStereoWidening* NewL(MCustomInterface& aCustomInterface);

A static constructor that creates a stereo widening utility object.

Arguments:

Returns:

A pointer to CStereoWidening.

Error handling:

This method leaves with the following typical leave codes:

ApplyPresetL
void ApplyPresetL(TInt aPresetIndex);

Used to apply the preset values.

Arguments:

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

CreatePresetL
void CreatePresetL(TDesC& aName, CStereoWidening& aStereoWidening);

Createa a user-defined preset with the specified equalizer settings.

Arguments:

Returns:

An updated list of presets is returned if the operation is successful.

Error handling:

This method leaves with the following typical leave codes:

DeletePresetL
void DeletePresetL(TInt aPresetIndex);

Deletes the specified user-defined preset.

Arguments:

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

DisableStereoWideningL
void DisableStereoWideningL ();

Deletes the specified user-defined preset.

Arguments:

Returns:

None.

Error handling:

GetPresetL
const TDesC& GetPresetL (TInt aPresetIndex);

Retrieves the Preset values from the Central Repository and stores it in the Equalizer Object. Also it returns the Name of the retrieved Preset.

Arguments:

Returns:

Name of the Retrieved Preset.

Error handling:

This method leaves with the following typical leave codes:

ModifyPresetL
void ModifyPresetL(TInt aPresetIndex, TDesC& aName, CStereoWidening& aStereoWidening);

Modifies a user-defined preset with the specified equalizer settings.

Arguments:

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

NumberOfPreDefinedPresets
TUint32 NumberOfPreDefinePresets() const;

Gets the number of predefined presets.

Arguments:

None.

Returns:

The number of predefined presets.

Presets
TArray<TEfAudioStereoWideningUtilityPreset> Presets();

Gets the list of preset names.

Arguments:

None.

Returns:

An array of all the preset names (pre-defined and user-defined). The pre-defined presets are in the beginning of the list.

ResetPresetL()
void ResetPresetL(TInt aPresetIndex);

Resets the specified preset.

Arguments:

Note: If the preset index points to a preset that cannot be reset, the method will leave with KErrArgument.

Returns:

None.

Error handling:

This method leaves with the following typical leave codes:

StereoWidening
CStereoWidening& StereoWidening();

Gets the reverb object.

Arguments:

None.

Returns:

A reference to a stereo widening object.


Copyright © Nokia Corporation 2001-2008
Back to top