BASS.NET API for the Un4seen BASS Audio LibraryBASS_CHANNELINFO ClassBASS.NET API for the Un4seen BASS Audio Library
Used with BASS_ChannelGetInfo(Int32, BASS_CHANNELINFO) to retrieve information on a channel.
Inheritance Hierarchy

SystemObject
  Un4seen.BassBASS_CHANNELINFO

Namespace: Un4seen.Bass
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.12.0
Syntax

[SerializableAttribute]
public sealed class BASS_CHANNELINFO

The BASS_CHANNELINFO type exposes the following members.

Constructors

  NameDescription
Public methodBASS_CHANNELINFO
Default constructor.
Top
Properties

  NameDescription
Public propertyIs32bit
Gets, if the flags property contains the BASS_SAMPLE_FLOAT resp. BASS_MUSIC_FLOAT flag.
Public propertyIs8bit
Gets, if the flags property contains the BASS_SAMPLE_8BITS resp. BASS_MUSIC_8BITS flag.
Public propertyIsDecodingChannel
Is the channel a decoding channel?
Top
Methods

  NameDescription
Public methodToString
A description of the record decive info object (driver file name, inputs etc.).
(Overrides ObjectToString.)
Top
Fields

  NameDescription
Public fieldchans
Number of channels... 1=mono, 2=stereo, etc.
Public fieldctype
The type of channel it is, which can be one of the following (see BASSChannelType), or another value if it's an add-on format (see the add-on's API).
BASS_CTYPE_SAMPLESample channel. (HCHANNEL)
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_OGGOGG format file stream.
BASS_CTYPE_STREAM_MP1MP1 format file stream.
BASS_CTYPE_STREAM_MP2MP2 format file stream.
BASS_CTYPE_STREAM_MP3MP3 format file stream.
BASS_CTYPE_STREAM_AIFFAudio IFF format stream.
BASS_CTYPE_STREAM_CACoreAudio codec stream. Additional information is avaliable via the BASS_TAG_CACODEC tag.
BASS_CTYPE_STREAM_MFMedia Foundation codec stream. Additional format information is avaliable from BASS_ChannelGetTags(Int32, BASSTag) (BASS_TAG_WAVEFORMAT).
BASS_CTYPE_STREAM_WAVWAVE format flag. This can be used to test if the channel is any kind of WAVE format (LOWORD contains the codec number).
BASS_CTYPE_STREAM_WAV_PCMWAV format file stream, PCM.
BASS_CTYPE_STREAM_WAV_FLOATWAV format file stream, Floating-Point.
BASS_CTYPE_MUSIC_MODMOD format music. This can also be used as a flag to test if the channel is any kind of HMUSIC.
BASS_CTYPE_MUSIC_MTMMTM format music.
BASS_CTYPE_MUSIC_S3MS3M format music.
BASS_CTYPE_MUSIC_XMXM format music.
BASS_CTYPE_MUSIC_ITIT format music.
BASS_CTYPE_MUSIC_MO3MO3 format flag, used in combination with one of the BASS_CTYPE_MUSIC types.
BASS_CTYPE_RECORDRecording channel. (HRECORD)
Other channel types may be supported by add-ons, see the documentation.
Public fieldfilename
The filename associated with the channel. (HSTREAM only)
Public fieldflags
BASS_SAMPLE/STREAM/MUSIC/SPEAKER flags. A combination of these flags (see BASSFlag):
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_SOFTWAREThe channel is NOT using hardware mixing... it doesn't benefit from any special hardware interpolation, etc.
BASS_SAMPLE_VAMThe channel is using the DX7 voice allocation and management features. (HCHANNEL only)
BASS_SAMPLE_MUTEMAXThe channel is muted when at (or beyond) it's max distance. (HCHANNEL)
BASS_SAMPLE_FXThe channel has the "with FX flag" DX8 effects implementation enabled. (HSTREAM/HMUSIC)
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)
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_POSRESETAll notes will be stopped when seeking in the MOD music. (HMUSIC)
BASS_MUSIC_POSRESETEXAll notes will be stopped and BPM/etc reset when seeking in the MOD music. (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_UNICODEA filename, command-line or argument is a Unicode (UTF-16) string.
Other flags may be supported by add-ons, see the documentation.
Public fieldfreq
Default playback rate.
Public fieldorigres
The original resolution (bits per sample)... 0 = undefined.
Public fieldplugin
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(Int32).

Public fieldsample
The sample that is playing on the channel. (HCHANNEL only)
Top
Remarks

A "channel" can be a playing sample (HCHANNEL), a sample stream (HSTREAM), a MOD music (HMUSIC), or a recording (HRECORD).

Each "Channel" function can be used with one or more of these channel types.

The BASS_SAMPLE_SOFTWARE flag indicates whether or not the channel's sample data is being mixed into the final output by the hardware. It does not indicate (in the case of a stream or MOD music) whether the processing required to generate the sample data is being done by the hardware, this processing is always done in software.

BASS supports 8/16/32-bit sample data, so if a WAV file, for example, uses another sample resolution, it'll have to be converted by BASS. The origres member can be used to check what the resolution originally was.

Examples

BASS_CHANNELINFO info = new BASS_CHANNELINFO();
Bass.BASS_ChannelGetInfo(channel, info); // get info
if (info.ctype == BassChannel.BASS_CTYPE_STREAM_MP3) 
{
    // it's an MP3!
}
See Also

Reference