Developers guide
Chapter 16: Sound
Sound API Elements
162 Psion Teklogix Mobile Devices SDK Developers Guide
• Asynchronous—the sound is played asynchronously and the call returns immediately after
beginning the sound. To terminate an asynchronously played waveform sound before it is
complete, either another waveform sound must be started, or a call must be made to an API
element that stops the playing of sounds.
• Synchronous—the sound is played synchronously and the call returns when the waveform
sound is complete.
• Loop—the call returns immediately after beginning the sound and the sound is played repeat-
edly. To terminate a looping waveform sound either another waveform sound must be started
or a call must be made to an API element that stops the playing of sounds.
The WAV file can be located anywhere in the file system. When specifying a filename as a param-
eter, the full filename and path should be included in the string. If the path is not specified, the
Windows default pathnames are searched.
A WAV file can be played from a memory card inserted in one of the card slots on the
Psion Teklogix computer. In this case, the folder name representing the card must be included in
the filename string. The filename string, in this case, will be similar to one of the following:
• sd-mmc\wavefile.wav
• hard disk\wavefile.wav
• storage card\wavefile.wav
16.4 Sound API Elements
C++: The beeper on all Psion Teklogix Windows CE computers is controlled using the
PsionTeklogix::Sound namespace. Use the Microsoft
®
Win32 APIs to control the playing of
WAV files.
Java: The playing of WAV files and the beeper on all Psion Teklogix Windows CE computers is
controlled using the com.teklogix.sound package.
.NET: The playing of WAV files on all Psion Teklogix Windows CE computers is controlled using
the PsionTeklogix.Sound namespace. The beeper on all Psion Teklogix computers is controlled
using the PsionTeklogix.Sound.Beeper namespace.
Warning: If an application terminates without stopping a looping waveform sound, the
sound will continue to play. The sound is terminated when another application
calls the API element that stops the playing of sounds.