WavePlay(short mode, short frequency, void *sample, long length)
This function uses the DMA sound capabilities of the STE to Falcon range of computers to play back signed sample data.
The only draw-back to using this function is that you must check the cookie jar to see if SAM is installed before calling it. Simply check for the cookie 'SAM\0' (that is the three letters SAM followed by a 0 byte) in the cookie jar. If this is present, then it is ok to call WavePlay, otherwise dont, as it may cause a crash.
The 'mode' flag indicates whether it is 8/16-bit and mono/stereo. This is encoded in the following way:
| Bit | 1 | 0 |
| Meaning if set | 16-bit | Stereo |
Thus, 0=8-bit mono, 1=8 bit stereo, 3=16 bit stereo.
There is also extended functionality of this function call which allows access to the user defined sounds supplied by SAM, as well as providing applications with the ability of user defined sound triggers. Documentation regarding this can be found accompanying KP SACK, our (Kosmik Phish Productions') SAM utility.
Anthony Jacques : jacquesa@zetnet.co.uk