Namespace: Un4seen.BassAsio
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
[DllImportAttribute("bassasio")] public static bool BASS_ASIO_ChannelEnableBASS( bool input, int channel, int handle, bool join )
Parameters
- input
- Type: SystemBoolean
Dealing with an input channel? = an output channel. - channel
- Type: SystemInt32
The input/output channel number... 0 = first. - handle
- Type: SystemInt32
The BASS channel handle. - join
- Type: SystemBoolean
Join the next ASIO channels according to the number of audio channels in the BASS channel?
Return Value
Type: BooleanIf succesful, then is returned, else is returned. Use BASS_ASIO_ErrorGetCode to get the error code.
This function allows BASS channels to be used directly, without needing an ASIOPROC callback function. The ASIO channel's format and rate are set accordingly. If the BASS channel is not mono then multiple ASIO channels should also be joined accordingly. That can be done automatically via the join parameter, or manually with BASS_ASIO_ChannelJoin(Boolean, Int32, Int32). If the device does not have enough channels, the BASSmix add-on can be used to downmix the BASS channel.
In the case of output channels, the BASS channel must have the BASS_STREAM_DECODE flag set. In the case of input channels, the BASS channel must be a 'push' stream, created with BASS_StreamCreatePush(Int32, Int32, BASSFlag, IntPtr), which will receive the data from the input channel(s).
Raw DSD streams are supported (with the BASSDSD add-on) but the device needs to have been successfully set to DSD mode first with BASS_ASIO_SetDSD(Boolean). The device's sample rate should also be set to the DSD stream's rate (its BASS_ATTRIB_DSD_RATE attribute) via BASS_ASIO_SetRate(Double).
ERROR CODE | Description |
---|---|
BASS_ERROR_INIT | BASS_ASIO_Init(Int32, BASSASIOInit) has not been successfully called. |
BASS_ERROR_NOTAVAIL | The BASS library is not loaded. |
BASS_ERROR_START | The device has been started - it needs to be stopped before (dis)enabling channels. |
BASS_ERROR_ILLPARAM | The input and channel combination is invalid. |
BASS_ERROR_HANDLE | handle is invalid. |
BASS_ERROR_FORMAT | 8-bit BASS channels are not supported; the BASS_SAMPLE_FLOAT flag can be used to avoid them. |
BASS_ERROR_NOCHAN | The device does not have enough channels to accommodate the BASS channel. |