Replace manual option handling by use of glib
[lcid-xwax.git] / rig.h
blob4092306ffb206d2e042de066f0c29c429ba17d13
1 /*
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.
7 *
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,
16 * MA 02110-1301, USA.
20 #ifndef RIG_H
21 #define RIG_H
23 #define MAX_DEVICES 4
24 #define MAX_TRACKS 8
25 #define MAX_PLAYERS 4
26 #define MAX_TIMECODERS 4
28 #define MAX_DEVICE_POLLFDS 32
30 struct rig_t {
31 int finished;
32 pthread_t pt_realtime, pt_service;
34 struct device_t *device[MAX_DEVICES];
35 struct track_t *track[MAX_TRACKS];
36 struct player_t *player[MAX_PLAYERS];
37 struct timecoder_t *timecoder[MAX_TIMECODERS];
39 int event[2]; /* pipe to wake up service thread */
41 /* Poll table for devices */
43 int npt;
44 struct pollfd pt[MAX_DEVICE_POLLFDS];
47 int rig_init(struct rig_t *rig);
48 int rig_start(struct rig_t *rig);
49 int rig_awaken(struct rig_t *rig);
50 int rig_stop(struct rig_t *rig);
52 #endif