Assembly: Bass.Net (in Bass.Net.dll) Version: 126.96.36.199
[DllImportAttribute("bassasio.dll", CharSet = CharSet.Auto)] public static bool BASS_ASIO_ChannelSetRate( bool input, int channel, double rate )
<DllImportAttribute("bassasio.dll", CharSet := CharSet.Auto>] Public Shared Function BASS_ASIO_ChannelSetRate ( input As Boolean, channel As Integer, rate As Double ) As Boolean
public: [DllImportAttribute(L"bassasio.dll", CharSet = CharSet::Auto)] static bool BASS_ASIO_ChannelSetRate( bool input, int channel, double rate )
[<DllImportAttribute("bassasio.dll", CharSet = CharSet.Auto)>] static member BASS_ASIO_ChannelSetRate : input : bool * channel : int * rate : float -> bool
- Type: SystemBoolean
Dealing with an input channel? = an output channel.
- Type: SystemInt32
The input/output channel number... 0 = first.
- Type: SystemDouble
The sample rate... 0 = device rate.
Return ValueType: Boolean
If succesful, then is returned, else is returned. Use BASS_ASIO_ErrorGetCode to get the error code.
For optimal quality and performance, it is best to set the device to the sample rate you want via BASS_ASIO_SetRate(Double), but that's not always possible. Which is where this function and resampling comes into play. 16 point sinc interpolation is used, giving a good blend of sound quality and performance. It is also SSE2 and 3DNow optimized for an extra boost with supporting CPUs.
When a channel's sample rate is the same as the device rate, resampling is bypassed, so there's no unnecessary performance hit.
Resampling is not supported when the sample format is DSD.
|BASS_ERROR_INIT||BASS_ASIO_Init(Int32, BASSASIOInit) has not been successfully called.|
|BASS_ERROR_ILLPARAM||The input and channel combination is invalid, or rate is below 0.|
|BASS_ERROR_FORMAT||Format conversion is not available for the channel's native sample format (please report).|
' set the device rate BassAsio.BASS_ASIO_SetRate(44100) ' set the channel's rate BassAsio.BASS_ASIO_ChannelSetRate(False, 0, 44100)
// set the device rate BassAsio.BASS_ASIO_SetRate(44100); // set the channel's rate BassAsio.BASS_ASIO_ChannelSetRate(false, 0, 44100);