00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include <stdio.h>
00023 #include <stdlib.h>
00024 #include <limits.h>
00025 #include "local.h"
00026
00027 typedef struct {
00028 int (*close)(snd_timer_t *timer);
00029 int (*nonblock)(snd_timer_t *timer, int nonblock);
00030 int (*info)(snd_timer_t *timer, snd_timer_info_t *info);
00031 int (*params)(snd_timer_t *timer, snd_timer_params_t *params);
00032 int (*status)(snd_timer_t *timer, snd_timer_status_t *status);
00033 int (*rt_start)(snd_timer_t *timer);
00034 int (*rt_stop)(snd_timer_t *timer);
00035 int (*rt_continue)(snd_timer_t *timer);
00036 ssize_t (*read)(snd_timer_t *timer, void *buffer, size_t size);
00037 } snd_timer_ops_t;
00038
00039 struct _snd_timer {
00040 char *name;
00041 snd_timer_type_t type;
00042 int mode;
00043 int poll_fd;
00044 snd_timer_ops_t *ops;
00045 void *private_data;
00046 };
00047
00048 int snd_timer_hw_open(snd_timer_t **handle, const char *name, int dev_class, int dev_sclass, int card, int device, int subdevice, int mode);
00049
00050 typedef struct {
00051 int (*close)(snd_timer_query_t *timer);
00052 int (*next_device)(snd_timer_query_t *timer, snd_timer_id_t *tid);
00053 } snd_timer_query_ops_t;
00054
00055 struct _snd_timer_query {
00056 char *name;
00057 snd_timer_type_t type;
00058 int mode;
00059 int poll_fd;
00060 snd_timer_query_ops_t *ops;
00061 void *private_data;
00062 };
00063
00064 int snd_timer_query_hw_open(snd_timer_query_t **handle, const char *name, int mode);