]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Added missing functions..
authorJaroslav Kysela <perex@perex.cz>
Mon, 8 Mar 1999 20:06:02 +0000 (20:06 +0000)
committerJaroslav Kysela <perex@perex.cz>
Mon, 8 Mar 1999 20:06:02 +0000 (20:06 +0000)
src/timer/timer.c

index 4158f39a68866e7b8372f53d953da2c413eac899..014003eb6f03b8db6d49bd3a752a8e29892f6c45 100644 (file)
@@ -148,6 +148,42 @@ int snd_timer_status(void *handle, snd_timer_status_t * status)
        return 0;
 }
 
+int snd_timer_start(void *handle)
+{
+       snd_timer_t *tmr;
+
+       tmr = (snd_timer_t *) handle;
+       if (!tmr)
+               return -EINVAL;
+       if (ioctl(tmr->fd, SND_TIMER_IOCTL_START) < 0)
+               return -errno;
+       return 0;
+}
+
+int snd_timer_stop(void *handle)
+{
+       snd_timer_t *tmr;
+
+       tmr = (snd_timer_t *) handle;
+       if (!tmr)
+               return -EINVAL;
+       if (ioctl(tmr->fd, SND_TIMER_IOCTL_STOP) < 0)
+               return -errno;
+       return 0;
+}
+
+int snd_timer_continue(void *handle)
+{
+       snd_timer_t *tmr;
+
+       tmr = (snd_timer_t *) handle;
+       if (!tmr)
+               return -EINVAL;
+       if (ioctl(tmr->fd, SND_TIMER_IOCTL_CONTINUE) < 0)
+               return -errno;
+       return 0;
+}
+
 ssize_t snd_timer_read(void *handle, void *buffer, size_t size)
 {
        snd_timer_t *tmr;