SelectSamplePlayer
Gets the name of the instrument to play the sample.
Synopsis
char *SelectSamplePlayer( Item Sample, int32 IfVariable )
Description
This function gets and returns the name of the appropriate instrument that will play the given sample. If there is no appropriate instrument to play the sample, it returns NULL. This function looks at the sample rate, the number of channels (mono or stereo), width (8 or 16), and compression type to determine the appropriate instrument for the sample. It also lets you specify whether you need to vary the pitch or play only at the original pitch.
Arguments
- Sample
- The item number of the sample to be played.
- IfVariable
- A value indicating whether or not the pitch is to vary. If TRUE, the pitch will vary. If FALSE, the pitch won't vary.
Return Value
This function returns the name of the instrument that will play the given sample, or NULL if there is no appropriate instrument to play the sample.
Implementation
Library call implemented in music.lib V20.
Associated Files
score.h, music.lib
See Also
LoadSoundFile
()