Author
Topic: BASS_ChannelGetData improvement (Read 1150 times)

Many times we need to stream a channel's data for example to feed the data to BASSEnc.We have to call BASS_ChannelGetData in a loop and the buffer gets filled over and over again though we don't need the data.It came to my mind that could it be possible to optimize the logic for these cases?For example a flag for BASS_ChannelGetData to not fill the buffer but still stream the data to DSP/BASSEnc?I mean it would be faster/more optimized? Wouldn't it?

A buffer is needed to receive data from the decoder before it can be fed to DSP/etc, so I'm afraid it isn't possible to remove the buffer requirement. BASS_ChannelGetData could be modified to not require a buffer to be provided, but it would then have to allocate one itself internally, which would probably actually make performance worse due to the extra memory allocation calls. So not much point doing that