Demo: Fix #314 by always honoring sample limit changes
This commit is contained in:
parent
e2b99f04d8
commit
536141ff49
|
@ -777,9 +777,9 @@ static int prepare_data(int fd, int revents, void *cb_data)
|
|||
expected_samplenum = MIN(expected_samplenum, devc->limit_samples);
|
||||
|
||||
/* Of those, how many do we still have to send? */
|
||||
if (devc->num_logic_channels)
|
||||
if (devc->num_logic_channels && (devc->logic_counter < devc->limit_samples))
|
||||
logic_todo = expected_samplenum - devc->logic_counter;
|
||||
if (devc->num_analog_channels)
|
||||
if (devc->num_analog_channels && (devc->analog_counter < devc->limit_samples))
|
||||
analog_todo = expected_samplenum - devc->analog_counter;
|
||||
|
||||
while (logic_todo || analog_todo) {
|
||||
|
|
Loading…
Reference in New Issue