ToneIndicator.Sound Method
2/27/2008
Sounds the indicator or starts it sounding asynchronously.
Namespace: Microsoft.PointOfService
Assembly: Microsoft.PointOfService (in microsoft.pointofservice.dll)
Syntax
'Declaration
Public MustOverride Sub Sound ( _
numberOfCycles As Integer, _
interSoundWait As Integer _
)
public abstract void Sound (
int numberOfCycles,
int interSoundWait
)
public:
virtual void Sound (
int numberOfCycles,
int interSoundWait
) abstract
public abstract void Sound (
int numberOfCycles,
int interSoundWait
)
public abstract function Sound (
numberOfCycles : int,
interSoundWait : int
)
Parameters
- numberOfCycles
If WaitForever, then start the indicator sounding, and repeat continuously.Otherwise, perform the specified number of cycles.
- interSoundWait
When numberOfCycles is not one, then pause for InterSoundWait milliseconds before repeating the tone cycle (before playing tone1 again).
Remarks
The Sound method is performed synchronously if the AsyncMode property is false, and asynchronously if AsyncMode is true.
The duration of an indicator cycle is as follows:
Tone1Duration property +InterToneWait property +Tone2Duration property +interSoundWait parameter (except on the last tone cycle)
After the Tone Indicator has started an asynchronous sound, the sound can be stopped by using one of the following methods. (When a numberOfCycles value of WaitForever is used to start the sound, the application must use one of these to stop the continuous sounding of the tones.)
ClearOutput
SoundImmediate
The Sound method can throw general exceptions and a PosControlException exception. In this case, the PostControlException.ErrorCode property will be set to one of the following values:
Value |
Meaning |
Claimed |
Another application has claimed the device and has taken over the speaker causing the sound from this method to be interrupted (can only be returned if AsyncMode is false). |
Illegal |
One of the following errors occurred: numberOfCycles is neither a positive, nonzero value nor WaitForever. numberOfCycles is WaitForever when AsyncMode is false. A negative interSoundWait was specified. |
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread-safe. Any instance members are not guaranteed to be thread-safe.
See Also
Reference
ToneIndicator Class
ToneIndicator Members
Microsoft.PointOfService Namespace