The sample rate of a channel.

    DWORD handle,
    float freq


handleThe channel handle.
freqThe sample rate... 0 = original rate (when the channel was created).


This attribute applies to playback of the channel, and does not affect the channel's sample data, so it has no real effect on decoding channels. It is still adjustable then though, so that it can be used by the BASSmix add-on and anything else that wants to use it.

It is not possible to change the sample rate of a channel if the "with FX flag" DX8 effect implementation enabled on it, unless DirectX 9 or above is installed.

Increasing the sample rate of a stream or MOD music increases its CPU usage, and reduces the length of its playback buffer in terms of time. If you intend to raise the sample rate above the original rate, then you may also need to increase the buffer length via the BASS_CONFIG_BUFFER config option to avoid break-ups in the sound.

When using BASS_ChannelSlideAttribute to slide this attribute, the BASS_SLIDE_LOG flag can be used to make a slide logarithmic rather than linear.


When using DirectSound output on Windows, the sample rate will get rounded down to a whole number during playback.

See also

BASS_ChannelGetAttribute, BASS_ChannelSetAttribute, BASS_ChannelSlideAttribute, BASS_GetInfo