The download callback function on an internet stream.

    DWORD handle,
    void *info,
    DWORD size


handleThe channel handle.
infoA pointer to a DOWNLOADPROC callback function and user parameter. The user parameter is optional; if it is not included then the existing value will be kept.
sizeThe size of the info. This should be the size of one or two pointers, depending on whether a user parameter is included.


This attribute can be used to change the DOWNLOADPROC callback function that was set in a BASS_StreamCreateURL call. The new callback function will only receive data that is subsequently downloaded, not any that has already been downloaded. Callbacks can be disabled by setting it to NULL.

This attribute can be set at any time, including within a DOWNLOADPROC function.


For Java on Android, a BASS_ChannelSetAttributeDOWNLOADPROC function is provided to set this attribute, to be used instead of BASS_ChannelSetAttributeEx. It will not be possible to get the same value back from BASS_ChannelGetAttributeEx (as it will be converted to an internal wrapper form) except when it is NULL.


Set a new download callback on a stream.
void *info[2] = { (void*)DownloadProc, user };
BASS_ChannelSetAttributeEx(stream, BASS_ATTRIB_DOWNLOADPROC, info, sizeof(info));

Disable download callbacks on a stream.

void *proc = NULL;
BASS_ChannelSetAttributeEx(stream, BASS_ATTRIB_DOWNLOADPROC, &proc, sizeof(proc));

See also

BASS_ChannelGetAttributeEx, BASS_ChannelSetAttributeEx, BASS_StreamCreateURL