BASS.NET API for the Un4seen BASS Audio LibraryBaseDSPChannelBitwidth Property BASS.NET API for the Un4seen BASS Audio Library
This property returns the actual bitwidth of the sample data of the channel (e.g. 8, 16, 32).

Namespace: Un4seen.Bass.Misc
Assembly: Bass.Net (in Bass.Net.dll) Version:

public int ChannelBitwidth { get; }

Property Value

Type: Int32

BASS supports 8/16/32-bit sample data, so if a WAV file, for example, uses another sample resolution, it'll have to be converted by BASS. This bitwidth represents the bitwidth which is used by BASS (e.g. in a DSP callback delegate) and does not represent the original bitwidth of the channel. The bitwidth used by BASS is determined how the underlying channel handle was created (e.g. using BASS_StreamCreateFile(String, Int64, Int64, BASSFlag) with the BASS_SAMPLE_8BITS or BASS_SAMPLE_FLOAT flag) and if the BASS_CONFIG_FLOATDSP option has been set. If non of the above was used, by default 16 bits per sample are used.

However this bitwidth is the bitwidth in use when sending sample data to the DSPCallback(Int32, Int32, IntPtr, Int32, IntPtr). If for example the BASS_CONFIG_FLOATDSP or the BASS_SAMPLE_FLOAT option have been used, the DSP would receive 32-bit float samples.

See Also