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_EAXMIXEAX wet/dry mix. (HCHANNEL/HMUSIC/HSTREAM only)
BASS_ATTRIB_BITRATEAverage bitrate. (HSTREAM)
BASS_ATTRIB_CPUCPU usage. (HMUSIC/HSTREAM)
BASS_ATTRIB_FREQSample rate.
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_NOBUFFERPlayback buffering switch. (HMUSIC/HSTREAM)
BASS_ATTRIB_NORAMPPlayback ramping switch.
BASS_ATTRIB_PANPanning/balance position.
BASS_ATTRIB_SRCSample rate conversion quality.
BASS_ATTRIB_VOLVolume level.
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