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.
BASS_ATTRIB_BUFFERPlayback buffering length.
BASS_ATTRIB_CPUCPU usage.
BASS_ATTRIB_DOWNMIXPlayback downmixing.
BASS_ATTRIB_FREQSample rate.
BASS_ATTRIB_GRANULEProcessing granularity.
BASS_ATTRIB_MUSIC_ACTIVEMOD music active channel count.
BASS_ATTRIB_MUSIC_AMPLIFYMOD music amplification level.
BASS_ATTRIB_MUSIC_BPMMOD music BPM.
BASS_ATTRIB_MUSIC_PANSEPMOD music pan separation level.
BASS_ATTRIB_MUSIC_PSCALERMOD music position scaler.
BASS_ATTRIB_MUSIC_SPEEDMOD music speed.
BASS_ATTRIB_MUSIC_VOL_CHANMOD music channel volume level.
BASS_ATTRIB_MUSIC_VOL_GLOBALMOD music global volume level.
BASS_ATTRIB_MUSIC_VOL_INSTMOD music instrument/sample volume level.
BASS_ATTRIB_NET_RESUMEDownload buffer level to resume stalled playback.
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.
BASS_ATTRIB_VOLVolume level.
BASS_ATTRIB_VOLDSPDSP chain volume level.
BASS_ATTRIB_VOLDSP_PRIORITYDSP chain volume priority.
Other attributes may be supported by add-ons.
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_ILLTYPEThe channel does not have the requested attribute.
some attributes may have additional error codes, see the documentation.

Remarks

Integer attribute values are converted to floating-point by this function, but that may be imprecise if the value exceeds +/-16777216. The exact value is available from BASS_ChannelGetAttributeEx in that case.

See also

BASS_ChannelGet3DAttributes, BASS_ChannelGetAttributeEx, BASS_ChannelGetInfo, BASS_ChannelSetAttribute