BASS.NET API for the Un4seen BASS Audio LibraryBaseEncoderChannelBitwidth 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: 2.4.12.0
Syntax

public int ChannelBitwidth { get; }

Property Value

Type: Int32

Implements

IBaseEncoderChannelBitwidth
Remarks

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 stream. 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 an encoder. If for example the BASS_CONFIG_FLOATDSP or the BASS_SAMPLE_FLOAT option have been used, the encoder would receive 32-bit float samples. If the derived encoder implementation does not support floating-point sample data, the encoder implementation should use one of the BASSEncode flags: BASS_ENCODE_FP_8BIT, BASS_ENCODE_FP_16BIT, BASS_ENCODE_FP_24BIT, BASS_ENCODE_FP_32BIT.

See Also

Reference