static void samples_generator(uint8_t *buf, uint64_t size, void *data)
{
+ static uint64_t p = 0;
struct databag *mydata = data;
- uint64_t p, i;
+ uint64_t i;
memset(buf, 0, size);
switch (mydata->sample_generator) {
case GENMODE_DEFAULT:
- p = 0;
for (i = 0; i < size; i++) {
*(buf + i) = ~(genmode_default[p] >> 1);
if (++p == 64)
/* Run the demo thread. */
g_thread_init(NULL);
+ /* this needs to be done between g_thread_init() and g_thread_create() */
mydata->timer = g_timer_new();
thread_running = 1;
my_thread =