ChannelGetAttribute(handle, BASSAttribute.BASS_ATTRIB_BUFFER wrong value?

Started by smoodilio,

smoodilio

Hi all,

I think I have found a bug:

Bass.BASS_ChannelSetAttribute(matrix_handle, BASSAttribute.BASS_ATTRIB_BUFFER, 500)

 Dim mixerBufferMs As Single
 Bass.BASS_ChannelGetAttribute(matrix_handle, BASSAttribute.BASS_ATTRIB_BUFFER, mixerBufferMs)

 Console.WriteLine(mixerBufferMs)

The console reports: 0,5

Ian @ un4seen

The BASS_CONFIG_BUFFER setting at the time of the channel's creation (eg. BASS_StreamCreate call) actually determines the buffer size, and the BASS_ATTRIB_BUFFER setting controls how full it's kept by the buffer update cycles. So the latter can never exceed the former, and the default BASS_CONFIG_BUFFER setting is 500ms, so that'll be why BASS_ATTRIB_BUFFER is being capped at 0.5s. Please see the BASS_ATTRIB_BUFFER documentation for details.