struct alsa *alsa;
int err;
- if (!(sdi = get_sigrok_device_instance(device_instances, 0)))
+ if (!(sdi = get_sigrok_device_instance(device_instances, device_index)))
return SIGROK_ERR;
alsa = sdi->priv;
struct sigrok_device_instance *sdi;
struct alsa *alsa;
- if (!(sdi = get_sigrok_device_instance(device_instances, 0)))
+ if (!(sdi = get_sigrok_device_instance(device_instances, device_index)))
return;
alsa = sdi->priv;
if (!alsa)
char inb[4096];
int i, x, count;
+ fd = fd;
+ revents = revents;
+
do {
memset(inb, 0, sizeof(inb));
count = snd_pcm_readi(alsa->capture_handle, inb,