snd_codec_formats%(index%, flags%)

Parameters
index%
Index of codec, ranges from 0 to one less than snd_codec_count.
flags%
Combination of flags to use:
1 - Format can be used for playback.
2 - Format can be used for recording.
4 - Format is supported with hardware. If flags 1 or 2 are absent, all formats supported in hardware are counted.

Description
Counts the number of available formats. The flags control what formats are counted and then made available. Index should be a codec
ranging from 0 to one less than snd_codec_count.

Note: This value should be cached, to avoid code errors and increase performance. Example:

Local format_count = snd_codec_formats(mycodec, 0)
for i=0 to format_count-1
...

Return
Returns the count of formats.

SndLib : Sound Codecs : snd_codec_formats