2 * Copyright (C) 2008 Mark Hills <mark@pogo.org.uk>
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * version 2, as published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License version 2 for more details.
13 * You should have received a copy of the GNU General Public License
14 * version 2 along with this program; if not, write to the Free
15 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
26 #define DEVICE_CHANNELS 2
27 #define DEVICE_RATE 44100
28 #define DEVICE_FRAME 32
33 struct timecoder_t
*timecoder
;
34 struct player_t
*player
;
36 int (*pollfds
)(struct device_t
*dv
, struct pollfd
*pe
, int n
);
37 int (*handle
)(struct device_t
*dv
);
39 int (*start
)(struct device_t
*dv
);
40 int (*stop
)(struct device_t
*dv
);
42 int (*clear
)(struct device_t
*dv
);
45 struct device_t
* createDevice(GError
**error
);
46 gboolean
connectAudio(struct device_t
* device
, int r
);
48 guint
get_device_count();
50 void device_connect_timecoder(struct device_t
*dv
, struct timecoder_t
*tc
);
51 void device_connect_player(struct device_t
*dv
, struct player_t
*pl
);
53 int device_start(struct device_t
*dv
);
54 int device_stop(struct device_t
*dv
);
56 int device_clear(struct device_t
*dv
);
58 int device_pollfds(struct device_t
*dv
, struct pollfd
*pe
, int n
);
59 int device_handle(struct device_t
*dv
);