Parameters |
---|
tag% |
Format tag, see info. |
samples% |
Samplers per second. For example, 44100 (44Khz). |
bits% |
Bits per sample. This is typically 8 or 16 for standard formats. |
channels% |
Channels per sample. This is typically 1 (Mono) or 2 (Stereo). |
Description |
---|
This function creates a primary sound format. This will mostly only be used for creating uncompressed formats. Tag should be set to zero, or 1 for Uncompressed. Unless you know the tag of a format (for example, something from a codec loaded with snd_codec_add), don't specify other tag values. Some formats are not valid. If you do not know what formats will work, or will be using many different configurations, use snd_codec_count and snd_codec_formats to find suitable formats. Typical formats: 8Khz 8-bit Mono = (1, 8000, 8, 1), 22Khz 16-bit Mono = (1, 22050, 16, 1). Note: This function may succeed even if the format isn't completely valid. This is caused when using a format that expects additional information. The best way to get these formats is to use snd_codec_count and snd_codec_formats. |
Return |
---|
Returns a handle to the create format if valid, otherwise zero. |
SndLib : Sound Formats : snd_format_create |
---|