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;


freqDefault sample rate.
chansNumber of channels... 1=mono, 2=stereo, etc.
flagsA combination of these flags.
BASS_SAMPLE_8BITSThe channel's resolution is 8-bit. If neither this or the BASS_SAMPLE_FLOAT flags are present, then the channel's resolution is 16-bit.
BASS_SAMPLE_FLOATThe channel's resolution is 32-bit floating-point.
BASS_SAMPLE_LOOPThe channel is looped.
BASS_SAMPLE_3DThe channel has 3D functionality enabled.
BASS_SAMPLE_MUTEMAXThe channel is muted when at (or beyond) its max distance.
BASS_STREAM_RESTRATEThe internet file download rate is restricted. (HSTREAM)
BASS_STREAM_BLOCKThe internet file (or "buffered" user file) is streamed in small blocks. (HSTREAM)
BASS_STREAM_AUTOFREEThe channel will automatically be freed when it ends. (HSTREAM/HMUSIC)
BASS_STREAM_DECODEThe channel is a "decoding channel". (HSTREAM/HMUSIC/HRECORD)
BASS_MUSIC_RAMPThe MOD music is using "normal" ramping. (HMUSIC)
BASS_MUSIC_RAMPSThe MOD music is using "sensitive" ramping. (HMUSIC)
BASS_MUSIC_SURROUNDThe MOD music is using surround sound. (HMUSIC)
BASS_MUSIC_SURROUND2The MOD music is using surround sound mode 2. (HMUSIC)
BASS_MUSIC_NONINTERThe MOD music is using non-interpolated mixing. (HMUSIC)
BASS_MUSIC_FT2MODThe MOD music is using FastTracker 2 .MOD playback. (HMUSIC)
BASS_MUSIC_PT1MODThe MOD music is using ProTracker 1 .MOD playback. (HMUSIC)
BASS_MUSIC_STOPBACKThe MOD music will be stopped when a backward jump effect is played. (HMUSIC)
BASS_SPEAKER_xxxSpeaker assignment flags. (HSTREAM/HMUSIC)
BASS_ASYNCFILEThe file is read asynchronously. (HSTREAM)
BASS_UNICODEfilename is in UTF-16 form.
other flags may be supported by add-ons, see the documentation.
ctypeThe type of channel it is, which can be one of the following.
BASS_CTYPE_STREAMUser sample stream. This can also be used as a flag to test if the channel is any kind of HSTREAM.
BASS_CTYPE_STREAM_DEVICE"dummy" stream for device final output mix (using STREAMPROC_DEVICE).
BASS_CTYPE_STREAM_VORBISOgg Vorbis format stream.
BASS_CTYPE_STREAM_MP1MPEG layer 1 format stream.
BASS_CTYPE_STREAM_MP2MPEG layer 2 format stream.
BASS_CTYPE_STREAM_MP3MPEG layer 3 format stream.
BASS_CTYPE_STREAM_AIFFAudio IFF format stream.
BASS_CTYPE_STREAM_AMAndroid media codec stream. Additional format information is avaliable from BASS_ChannelGetTags (BASS_TAG_AM_MIME).
BASS_CTYPE_STREAM_CACoreAudio codec stream. Additional format information is avaliable from BASS_ChannelGetTags (BASS_TAG_CA_CODEC).
BASS_CTYPE_STREAM_MFMedia Foundation codec stream. Additional format information is avaliable from BASS_ChannelGetTags (BASS_TAG_WAVEFORMAT).
BASS_CTYPE_STREAM_WAV_FLOATFloating-point PCM WAVE format stream.
BASS_CTYPE_STREAM_WAVWAVE format flag. This can be used to test if the channel is any kind of WAVE format. The codec (the file's "wFormatTag") is specified in the LOWORD. Additional information is also avaliable from BASS_ChannelGetTags (BASS_TAG_WAVEFORMAT).
BASS_CTYPE_MUSIC_MODGeneric MOD format music. This can also be used as a flag to test if the channel is any kind of HMUSIC.
BASS_CTYPE_MUSIC_MTMMultiTracker format music.
BASS_CTYPE_MUSIC_S3MScreamTracker 3 format music.
BASS_CTYPE_MUSIC_XMFastTracker 2 format music.
BASS_CTYPE_MUSIC_ITImpulse Tracker format music.
BASS_CTYPE_MUSIC_MO3MO3 format flag, used in combination with one of the BASS_CTYPE_MUSIC types.
other channel types may be supported by add-ons, see the documentation.
origresThe 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.
pluginThe 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.
sampleThe sample that is playing on the channel. Only applicable when ctype is BASS_CTYPE_SAMPLE or BASS_CTYPE_STREAM_SAMPLE.
filenameThe 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.


On Linux/macOS/iOS/Android, the BASS_UNICODE flag may not be present even if it was used in the stream's creation, as BASS will have translated the filename to the native UTF-8 form.


Check if a channel is an MP3 stream.
BASS_ChannelGetInfo(channel, &info); // get info
if (info.ctype == BASS_CTYPE_STREAM_MP3) {
    // it's an MP3!

See also