mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-06 13:29:59 -05:00
Updated to new timer API
This commit is contained in:
parent
6a949ee804
commit
9c084c4ba6
8 changed files with 234 additions and 18 deletions
|
|
@ -233,6 +233,15 @@ int snd_timer_hw_open(snd_timer_t **handle, const char *name, int dev_class, int
|
|||
close(fd);
|
||||
return -SND_ERROR_INCOMPATIBLE_VERSION;
|
||||
}
|
||||
if (mode & SND_TIMER_OPEN_TREAD) {
|
||||
int arg = 1;
|
||||
if (ioctl(fd, SNDRV_TIMER_IOCTL_TREAD, &arg) < 0) {
|
||||
ret = -errno;
|
||||
close(fd);
|
||||
SNDERR("extended read is not supported (SNDRV_TIMER_IOCTL_TREAD)");
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
memset(&sel, 0, sizeof(sel));
|
||||
sel.id.dev_class = dev_class;
|
||||
sel.id.dev_sclass = dev_sclass;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue