BASS_ChannelSetAttributes

Sets the basic attributes of a sample, stream, MOD music, or CD channel.

BOOL WINAPI BASS_ChannelSetAttributes(
    DWORD handle,
    int freq,
    int volume,
    int pan
);

Parameters
handleThe channel handle... a HCHANNEL, HMUSIC, HSTREAM, or CDCHANNEL.
freqThe sample rate... 100 (min) - 100000 (max), 0 = original rate (when the channel was created), -1 = leave current.
volumeThe volume... 0 (silent) - 100 (max), -1 = leave current.
panThe panning position... -100 (left) - 100 (right), -101 = leave current.

Return value
If succesful, 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_CDINIT BASS_CDInit has not been successfully called.
BASS_ERROR_CDVOLBASS could not find any volume control for the CD.
BASS_ERROR_FREQfreq is out of range... DirectSound only allows sample rates between 100 and 100000.

Remarks
Only the volume attribute can be adjusted for the CD channel, but not all soundcards allow controlling of the CD volume level.

It requires an increased amount of CPU processing to play MOD musics or streams at increased sample rates. If you plan to play MOD musics or streams at greatly increased sample rates, then you should increase the buffer lengths (using BASS_SetBufferLength) to avoid possible break-ups in the sound.

See also
BASS_ChannelGetAttributes, BASS_ChannelSet3DAttributes, BASS_SetGlobalVolumes