The constant at the top of the source file is the number of samples in a
datafeed submission chunk. The previous implementation erroneously made
it the size in bytes. There is no need to round down the buffer size
according to the unit size.
*/
inc->sample_unit_size = (inc->num_channels + 7) / 8;
inc->datafeed_buf_size = DATAFEED_MAX_SAMPLES;
- inc->datafeed_buf_size /= inc->sample_unit_size;
inc->datafeed_buf_size *= inc->sample_unit_size;
inc->datafeed_buffer = g_malloc(inc->datafeed_buf_size);
inc->datafeed_buf_fill = 0;