PolyTone (int Pitch, int Duration, int Volume) | Creates an instance of the PolyTone class with a specified pitch, duration, and volume for each tone in the sequence. Volume is defined by the range in Tone.VOLUME. |
PolyTone (int Pitch, int Duration, Tone.VOLUME Volume) | Creates an instance of the PolyTone class with a specified pitch, duration, and volume for each tone in the sequence. Volume is defined by an integer. |
The PolyTone constructors accept a variable list of single-tone entries of type Honeywell.Mobility.Device.Audio.Tone, but at least one entry is required.
Tone arguments that are missing one or two parameters or that specify a type other than Tone.VOLUME or int invalidate the entire PolyTone instance. Use IsPlayable to determine success or failure.
The PolyTone.Play method reproduces each tone in the order listed.
The member property CurrentVolume can be used to alter the loudness of the entire sequence. As shown in the example below, use the volume value Tone.VOLUME.OFF to generate pauses (rests) between audible tones.
[C#] using Honeywell.Mobility.Device.Audio; PolyTone Ptone1 = new PolyTone( 300, 100, Tone.VOLUME.NORMAL , 400, 100, Tone.VOLUME.NORMAL , 500, 100, Tone.VOLUME.NORMAL , 600, 75, Tone.VOLUME.NORMAL , 0, 175, Tone.VOLUME.OFF , // Rest (pause) for 175 milliseconds. 500, 75, Tone.VOLUME.NORMAL , 600, 400, Tone.VOLUME.NORMAL );