Used with BASS_ChannelGetInfo to retrieve information on a channel.
typedef struct { DWORD freq; DWORD chans; DWORD flags; DWORD ctype; DWORD origres; HPLUGIN plugin; HSAMPLE sample; char *filename; } BASS_CHANNELINFO;
freq | Default playback rate. | ||||||||||||||||||||||||||||||||||||||||||||||
chans | Number of channels... 1=mono, 2=stereo, etc. | ||||||||||||||||||||||||||||||||||||||||||||||
flags | A combination of these flags.
| ||||||||||||||||||||||||||||||||||||||||||||||
ctype | The type of channel it is, which can be one of the following.
| ||||||||||||||||||||||||||||||||||||||||||||||
origres | The original resolution (bits per sample)... 0 = undefined. If the original sample format is floating-point, then the BASS_ORIGRES_FLOAT flag will be set and the number of bits will be in the LOWORD. | ||||||||||||||||||||||||||||||||||||||||||||||
plugin | The plugin that is handling the channel... 0 = not using a plugin. Note this is only available with streams created using the plugin system via the standard BASS stream creation functions, not those created by add-on functions. Information on the plugin can be retrieved via BASS_PluginGetInfo. | ||||||||||||||||||||||||||||||||||||||||||||||
sample | The sample that is playing on the channel. (HCHANNEL only) | ||||||||||||||||||||||||||||||||||||||||||||||
filename | The filename associated with the channel. (HSTREAM only) |
With a recording channel, the BASS_STREAM_DECODE flag indicates that it is not using a RECORDPROC callback function.
BASS supports 8/16/32-bit sample data, so if a WAV file, for example, uses another sample resolution, it will have to be converted by BASS. The origres member can be used to check what the resolution originally was.
BASS_CHANNELINFO info; BASS_ChannelGetInfo(channel, &info); // get info if (info.ctype == BASS_CTYPE_STREAM_MP3) { // it's an MP3! }