Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

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



Location: bassnd.h
Link against: bafl.lib

Class TBaSystemSoundInfo

TBaSystemSoundInfo

Support

Supported from 6.0

Description

Provides functions that contain the information for a system sound. A sound may be a file, a tone or a fixed sequence.

The characteristics of a physical sound that corresponds to a logical sound are encapsulated in a TBaSystemSoundInfo object. You can get and set the physical sound for a logical sound through the functions provided by the BaSystemSound class.

Defined in TBaSystemSoundInfo:
EFile, ENull, ESequence, ETone, FileName(), FixedSequenceNumber(), SetFileName(), SetFixedSequenceNumber(), SetTone(), SoundCategory(), TBaSystemSoundInfo(), TSoundCategory, TTone, Tone()


Construction


TBaSystemSoundInfo()

TBaSystemSoundInfo();

Description

Constructs a default TBaSystemSoundInfo object. This object has a null type, default volume, default priority, null name, null fixed sequence, and tone of TTone.


TBaSystemSoundInfo()

TBaSystemSoundInfo(const TBaSystemSoundType& aType,const TBaSystemSoundName& aName,TInt aVolume=KSystemSoundDefaultVolume,TInt aPriority=KSystemSoundDefaultPriority);

Description

Constructs a TBaSystemSoundInfo object with the specified type and file name. The sound has default volume and priority.

Parameters

const TBaSystemSoundType& aType

Sound type

const TBaSystemSoundName& aName

Sound name

TInt aVolume=KSystemSoundDefaultVolume

Sound volume

TInt aPriority=KSystemSoundDefaultPriority

Sound priority


TBaSystemSoundInfo()

TBaSystemSoundInfo(const TBaSystemSoundType& aType,TInt aFixedSequence,TInt aVolume=KSystemSoundDefaultVolume,TInt aPriority=KSystemSoundDefaultPriority);

Description

Constructs a TBaSystemSoundInfo object with the specified type and sequence. The sound has default volume and priority.

Parameters

const TBaSystemSoundType& aType

Sound type

TInt aFixedSequence

Sound sequence

TInt aVolume=KSystemSoundDefaultVolume

Sound volume

TInt aPriority=KSystemSoundDefaultPriority

Sound priority


TBaSystemSoundInfo()

TBaSystemSoundInfo(const TBaSystemSoundType& aType,TTone aTone,TInt aVolume=KSystemSoundDefaultVolume,TInt aPriority=KSystemSoundDefaultPriority);

Description

Constructs a TBaSystemSoundInfo object with the specified type and tone. The sound has default volume and priority.

Parameters

const TBaSystemSoundType& aType

Sound type

TTone aTone

Sound tone

TInt aVolume=KSystemSoundDefaultVolume

Sound volume

TInt aPriority=KSystemSoundDefaultPriority

Sound priority

[Top]


Member functions


SoundCategory()

TSoundCategory SoundCategory() const;

Description

Gets the sound's category.

Return value

TSoundCategory

The system sound's category, or NULL if the sound is not a file, sequence, or tone.


FileName()

TBaSystemSoundName FileName() const;

Description

Gets the current sound's file.

Return value

TBaSystemSoundName

The current sound's file.


SetFileName()

void SetFileName(const TBaSystemSoundName& aFileName);

Description

Replaces the current sound with the specified file.

Parameters

const TBaSystemSoundName& aFileName

The file with which to replace the current sound.


FixedSequenceNumber()

TInt FixedSequenceNumber() const;

Description

Gets the current sound's sequence.

Return value

TInt

The current sound's sequence.


SetFixedSequenceNumber()

void SetFixedSequenceNumber(TInt aNumber);

Description

Replaces the current sound with the specified sequence number.

Parameters

TInt aNumber

The sequence number with which to replace the current sound.


SetTone()

void SetTone(const TTone& aTone);

Description

Replaces the current sound with the specified tone.

Parameters

const TTone& aTone

The tone with which to replace the current sound.


Tone()

TTone Tone() const;

Description

Gets the current system sound's tone.

Return value

TTone

The current sound's tone.

[Top]


Enumerations


Enum TSoundCategory

TSoundCategory

Description

Specifies the category of the system sound.

ENull

Specifies no system sound.

EFile

Specifies a file as the system sound.

ESequence

Specifies a sequence as the system sound.

ETone

Specifies a tone as the system sound.

[Top]


Classes


Class TTone

TTone

Description

Provides functions to define a tone. Once defined, the tone can be encapsulated using the TBaSystemSoundInfo class and subsequently played.

Defined in TBaSystemSoundInfo::TTone:
ExternalizeL(), InternalizeL(), TTone(), iDuration, iFrequency

Construction

TTone()


TTone();

Description

Default constructor. Sets up a TTone object with null frequency and duration.

TTone()


TTone(TInt aFrequency,TTimeIntervalMicroSeconds32 aDuration);

Description

Constructor which sets up a TTone object with specified frequency and duration.

Parameters

TInt aFrequency

The tone's frequency.

TTimeIntervalMicroSeconds32 aDuration

The tone's duration.

Member functions

ExternalizeL()


void ExternalizeL(RWriteStream& aStream) const;

Description

Saves a tone's frequency and duration.

Parameters

RWriteStream& aStream

The stream to which the tone's frequency and duration is written.

InternalizeL()


void InternalizeL(RReadStream&aStream);

Description

Gets a tone's frequency and duration.

Parameters

RReadStream& aStream

The stream from which the tone's frequency and duration is read.

Data members

iDuration


TTimeIntervalMicroSeconds32 iDuration

Description

Duration of the tone.

iFrequency


TInt iFrequency

Description

Frequency of the tone.