BASS_ChannelGetAttribute

Retrieves the value of a channel's attribute.

BOOL BASS_ChannelGetAttribute(
    DWORD handle,
    DWORD attrib,
    float *value
);

Parameters

handleThe channel handle... a HCHANNEL, HMUSIC, HSTREAM, or HRECORD.
attribThe attribute to get the value of... one of the following.
BASS_ATTRIB_BITRATEAverage bitrate. (HSTREAM only)
BASS_ATTRIB_BUFFERPlayback buffering length. (HMUSIC/HSTREAM)
BASS_ATTRIB_CPUCPU usage. (HMUSIC/HSTREAM)
BASS_ATTRIB_FREQSample rate.
BASS_ATTRIB_GRANULEProcessing granularity. (HMUSIC/HSTREAM/HRECORD)
BASS_ATTRIB_MUSIC_ACTIVEActive channel count. (HMUSIC)
BASS_ATTRIB_MUSIC_AMPLIFYAmplification level. (HMUSIC)
BASS_ATTRIB_MUSIC_BPMBPM. (HMUSIC)
BASS_ATTRIB_MUSIC_PANSEPPan separation level. (HMUSIC)
BASS_ATTRIB_MUSIC_PSCALERPosition scaler. (HMUSIC)
BASS_ATTRIB_MUSIC_SPEEDSpeed. (HMUSIC)
BASS_ATTRIB_MUSIC_VOL_CHANA channel volume level. (HMUSIC)
BASS_ATTRIB_MUSIC_VOL_GLOBALGlobal volume level. (HMUSIC)
BASS_ATTRIB_MUSIC_VOL_INSTAn instrument/sample volume level. (HMUSIC)
BASS_ATTRIB_NET_RESUMEBuffer level to resume stalled playback. (HSTREAM)
BASS_ATTRIB_NORAMPPlayback ramping.
BASS_ATTRIB_PANPanning/balance position.
BASS_ATTRIB_PUSH_LIMITPush stream buffer limit.
BASS_ATTRIB_SRCSample rate conversion quality.
BASS_ATTRIB_TAILLength extension. (HMUSIC/HSTREAM)
BASS_ATTRIB_VOLVolume level.
BASS_ATTRIB_VOLDSPDSP chain volume level. (HMUSIC/HSTREAM/HRECORD)
other attributes may be supported by add-ons, see the documentation.
valuePointer to a variable to receive the attribute value.

Return value

If successful, then TRUE is returned, else FALSE is returned. Use BASS_ErrorGetCode to get the error code.

Error codes

BASS_ERROR_HANDLEhandle is not a valid channel.
BASS_ERROR_NOTAVAILThe attribute is not available.
BASS_ERROR_ILLTYPEattrib is not valid.
some attributes may have additional error codes, see the documentation.

See also

BASS_ChannelGet3DAttributes, BASS_ChannelGetAttributeEx, BASS_ChannelGetInfo, BASS_ChannelSetAttribute