This command is used to control the format
of sound. This command impacts on the quality of sound output.
This command must be used before the
output instance is setup using mnStartOutput.
If you do not want to change an option
set it to 0 and it will be left unchanged.
The sound format of the instance used
to play data (mnPlayData) must be the same as the format of the data.
So if you want to play sound from an input instance, the output instance
must have the same format as the input instance. You can change the
sound input format of an instance using mnSetInputFormat, mnSetInputFormatHigh,
mnSetInputFormatMedium and mnSetInputFormatLow.
By default the sound output format is medium (mnSetOutputFormatMedium).
int InstanceID: The output instance ID that this command should
use.
unsigned short Channels: The number of channels. Monaural data uses one
channel and stereo data uses two channels. If there are two channels,
sound output can have different volume where channel 1 may represent
left speaker and channel 2 may represent right speaker.
unsigned int SamplesPerSec: Sample rate in hertz. Common values are 8000,
11025, 22050, and 44100.
unsigned int BitsPerSample: Bits per sample. This should be 8 or 16. If 8 then each sample of sound will be one byte in size, if 16 then each sample of sound will be two bytes in size.
0 if no error occurred.
-1 if an error occurred.
DBP
C++
.Net