Sets a channel's sample rate.
BOOL BASS_ASIO_ChannelSetRate( BOOL input, DWORD channel, double rate );
input | Dealing with an input channel? FALSE = an output channel. |
channel | The input/output channel number... 0 = first. |
rate | The sample rate... 0 = device rate. |
BASS_ERROR_INIT | BASS_ASIO_Init has not been successfully called. |
BASS_ERROR_ILLPARAM | The input and channel combination is invalid, or rate is below 0. |
BASS_ERROR_FORMAT | Resampling is not supported for the channel's sample format. |
When a channel's sample rate is the same as the device rate, resampling is bypassed, so there is no unnecessary performance hit.
Resampling is not supported when the sample format is DSD.
BASS_ASIO_SetRate(44100); // set the device rate BASS_ASIO_ChannelSetRate(FALSE, 0, 44100); // set the channel's rate