From f69148cbed7e24b47246502138401f358f2fb4a0 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Mon, 8 Mar 1999 20:06:02 +0000 Subject: [PATCH] Added missing functions.. --- src/timer/timer.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/timer/timer.c b/src/timer/timer.c index 4158f39a..014003eb 100644 --- a/src/timer/timer.c +++ b/src/timer/timer.c @@ -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; -- 2.47.1