CRadioPlayerUtility Class Reference

class CRadioPlayerUtility : public CBase

This class provides an interface to initiate and control playback of audio from the tuner.

RadioUtility.lib
Since
S60 3.2

Inherits from

Nested Classes and Structures

Constructor & Destructor Documentation

CRadioPlayerUtility()

CRadioPlayerUtility()[private]

~CRadioPlayerUtility()

~CRadioPlayerUtility()[private]

Member Functions Documentation

Close()

IMPORT_C voidClose()

Close the radio player and free all memory allocated. Any ongoing playing activity will be stopped if no other clients need it.

Since
S60 3.2

ConstructL()

voidConstructL()[private]

CustomInterface(TUid)

IMPORT_C TAny *CustomInterface(TUidaInterfaceId)

Retrieves a custom interface to the device. (Used by Audio Enhancement)

Since
S60 3.2

Parameters

TUid aInterfaceIdThe interface UID, defined with the custom interface.

GetBalance(TInt &, TInt &)

IMPORT_C TIntGetBalance(TInt &aLeftPercentage,
TInt &aRightPercentage
)const

Get the speaker balance set for playing.

Since
S60 3.2

Parameters

TInt & aLeftPercentageOn return contains left speaker volume perecentage. This can be any value from zero to 100. Zero value means left speaker is muted.
TInt & aRightPercentageOn return contains right speaker volume perecentage. This can be any value from zero to 100. Zero value means right speaker is muted.

GetMaxVolume(TInt &)

IMPORT_C TIntGetMaxVolume(TInt &aMaxVolume)const

Get the maximum volume supported by the device. Volume range from 0 to max. Setting volume to zero will mute the speakers.

Since
S60 3.2

Parameters

TInt & aMaxVolumeOn return contains the maximum volume supported.

GetVolume(TInt &)

IMPORT_C TIntGetVolume(TInt &aVolume)const

Get the current volume.

Since
S60 3.2

Parameters

TInt & aVolumeOn return contains the current volume.

IsMute()

IMPORT_C TBoolIsMute()

Find out if the audio is muted or not.

Since
S60 3.2

Mute(TBool)

IMPORT_C TIntMute(TBoolaMute)

Mutes or unmutes radio playback.

Since
S60 3.2

Parameters

TBool aMuteETrue to mute the audio, EFalse to unmute it.

NewL(RRadioSession &, MRadioPlayerObserver &)

CRadioPlayerUtility *NewL(RRadioSession &aRadioSession,
MRadioPlayerObserver &aObserver
)[private, static]

Factory function to create a new instance of the radio player utility.

Since
S60 3.2

Parameters

RRadioSession & aRadioSessionReference to radio session
MRadioPlayerObserver & aObserverThe observer object for receiving async completion callbacks

Play()

IMPORT_C voidPlay()

Asynchronous request to start playing the radio.

User must be ready to receive callback method MrpoStateChange. If radio plays successfully, the user will receive callback method MrpoStateChange with ERadioPlayerPlaying and KErrNone. If a problem is encountered, user will receive callback MrpoStateChange with ERadioPlayerIdle with an error code.

PlayerState()

IMPORT_C TPlayerStatePlayerState()const

Retrieve the current state of the player. If the radio is already playing, client should simply retrieve current settings such as volume, etc.

Since
S60 3.2

SetBalance(TInt, TInt)

IMPORT_C TIntSetBalance(TIntaLeftPercentage,
TIntaRightPercentage
)

Set the speaker balance for playing.

Since
S60 3.2

Parameters

TInt aLeftPercentageLeft speaker volume percentage. This can be any value from zero to 100. Setting a zero value mutes the sound on left speaker.
TInt aRightPercentageRight speaker volume percentage. This can be any value from zero to 100. Setting a zero value mutes the sound on right speaker.

SetVolume(TInt)

IMPORT_C TIntSetVolume(TIntaVolume)

Set the volume to the specified level. This can be any value from zero to max returned by GetMaxVolume.

Since
S60 3.2

Parameters

TInt aVolumeThe volume level to set.

SetVolumeRamp(const TTimeIntervalMicroSeconds &)

IMPORT_C TIntSetVolumeRamp(const TTimeIntervalMicroSeconds &aRampInterval)
Set a volume ramp. Must be called before Play.
Since
S60 3.2

Parameters

const TTimeIntervalMicroSeconds & aRampIntervalThe time interval over which the volume should be increased from zero to the current volume setting.

Stop()

IMPORT_C voidStop()

Asynchronous request to stop the radio.

This will stop radio for all client applications playing the radio. If the application wishes to terminate without disrupting the radio playback (in case of multiple active applications running), the application should terminate without issuing Stop. User must be ready to receive callback method MrpoStateChange.

Member Data Documentation

CBody * iBody

CBody *iBody[private]

Radio player utility implementation body Own.