Sets the Asio device's sample rate.
Namespace: Un4seen.BassAsio
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax
Parameters
- rate
- Type: SystemDouble
The sample rate.
Return Value
Type: BooleanIf succesful, then is returned, else is returned. Use BASS_ASIO_ErrorGetCode to get the error code.
Remarks
ERROR CODE | Description |
---|---|
BASS_ERROR_INIT | BASS_ASIO_Init(Int32, BASSASIOInit) has not been successfully called. |
BASS_ERROR_NOTAVAIL | The sample rate is not supported by the device/drivers. |
BASS_ERROR_UNKNOWN | Some other mystery problem! |
Examples
// get the channel info of the decoding stream BASS_CHANNELINFO info = Bass.BASS_ChannelGetInfo(streamDecoding); // set the source rate BassAsio.BASS_ASIO_ChannelSetRate(false, 0, (double)info.freq); // try to set the device rate too (saves resampling) BassAsio.BASS_ASIO_SetRate( (double)info.freq );
See Also