AddTone Method

This member of RFTone Object is supported on iOS, Windows Mobile, Windows CE, Palm, and DOS.

The AddTone method lets you add a specific note to an RFTone object.

VB

bStatus = object.AddTone (nFrequency, nDuration)

VC++

HRESULT hr = object->AddTone(short nFrequency, short nDuration, BOOL *bStatus);

Return Value

bStatus

The status of the function returned as Boolean True or False values. Use the RFGetLastError method to return the error value.

Parameters

nFrequency

The frequency for a single tone defined in numeric hertz (cycles per second).

nDuration

The duration of time the tone will play measured in milliseconds.

Remarks

Individual notes are stored within an RFTone object, each note defined by a frequency and a duration. Once defined, a specific note will remain within an RFTone object until either the object is released or all notes are cleared from the object using the ClearTones Method. This allows you to use a single tone object within your application that may be modified rather than creating a new tone object for each use.

Example

See the PlayTone Method.

 


Was this article useful?    

The topic was:

Inaccurate

Incomplete

Not what I expected

Other

Privacy and Legal