source: roaraudio/roard/include/roard.h @ 3207:76162d6ab87a

Last change on this file since 3207:76162d6ab87a was 3207:76162d6ab87a, checked in by phi, 14 years ago

use units.h

File size: 3.6 KB
Line 
1//roard.h:
2
3/*
4 *      Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2008, 2009
5 *
6 *  This file is part of roard a part of RoarAudio,
7 *  a cross-platform sound system for both, home and professional use.
8 *  See README for details.
9 *
10 *  This file is free software; you can redistribute it and/or modify
11 *  it under the terms of the GNU General Public License version 3
12 *  as published by the Free Software Foundation.
13 *
14 *  RoarAudio is distributed in the hope that it will be useful,
15 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 *  GNU General Public License for more details.
18 *
19 *  You should have received a copy of the GNU General Public License
20 *  along with this software; see the file COPYING.  If not, write to
21 *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
22 *
23 */
24
25#ifndef _ROARD_H_
26#define _ROARD_H_
27
28// configure ROAR_INFO()
29int g_verbose;
30#define ROAR_DBG_INFOVAR g_verbose
31
32// need to include this first as we need the config
33#include <roaraudio.h>
34#include <roaraudio/units.h>
35#include <libroarlight/libroarlight.h>
36#include <libroareio/libroareio.h>
37
38#include <ctype.h>
39
40#ifdef ROAR_HAVE_H_SIGNAL
41#include <signal.h>
42#endif
43
44#if defined(ROAR_HAVE_SELECT) && defined(ROAR_HAVE_H_SYS_SELECT)
45#include <sys/select.h>
46#endif
47
48#ifdef ROAR_HAVE_WAIT
49#include <sys/wait.h>
50#endif
51
52#if !defined(ROAR_TARGET_WIN32) && !defined(ROAR_TARGET_MICROCONTROLLER)
53#include <pwd.h>
54#endif
55
56#ifdef ROAR_HAVE_H_SYS_TIME
57#include <sys/time.h>
58#endif
59#ifdef ROAR_HAVE_H_TIME
60#include <time.h>
61#endif
62
63#ifdef ROAR_HAVE_LIBSLP
64#include <slp.h>
65#endif
66
67/*
68#ifdef __linux__
69#include <linux/unistd.h>
70#include <linux/ioprio.h>
71#endif
72*/
73
74#define ROAR_SUBSYS_NONE          0x00
75#define ROAR_SUBSYS_WAVEFORM      0x01
76#define ROAR_SUBSYS_MIDI          0x02
77#define ROAR_SUBSYS_CB            0x04
78#define ROAR_SUBSYS_LIGHT         0x08
79#define ROAR_SUBSYS_RAW           0x10
80#define ROAR_SUBSYS_COMPLEX       0x20
81#define ROAR_SUBSYS_RDTCS         0x40
82
83// listeing code:
84#define ROAR_MAX_LISTEN_SOCKETS  8
85
86//#include "buffer.h"
87#include "codecfilter.h"
88#include "container_framework.h"
89#include "client.h"
90#include "driver.h"
91#include "output.h"
92#include "mixer.h"
93//#include "convert.h"
94#include "streams.h"
95#include "network.h"
96#include "commands.h"
97#include "req.h"
98#include "emul_esd.h"
99#include "sources.h"
100#include "sample.h"
101#include "meta.h"
102#include "midi.h"
103#include "ssynth.h"
104#include "light.h"
105#include "raw.h"
106#include "rdtcs.h"
107#include "waveform.h"
108#include "lib.h"
109
110
111int alive;
112#ifdef ROAR_SUPPORT_LISTEN
113int g_no_listen;
114#endif
115
116uint32_t g_pos; // current possition in output stream
117
118int g_standby;
119int g_autostandby;
120
121int main_loop (int driver, DRIVER_USERDATA_T driver_inst, struct roar_audio_info * sa, int sysclocksync);
122void cleanup_listen_socket (int terminate);
123void clean_quit (void);
124void clean_quit_prep (void);
125
126void on_sig_int (int signum);
127void on_sig_term (int signum);
128void on_sig_chld (int signum);
129void on_sig_usr1 (int signum);
130
131#ifdef ROAR_SUPPORT_LISTEN
132struct {
133 int socket;
134 int proto;
135 union {
136  void * vp;
137  int    si;
138  struct {
139   int                    dir;
140   struct roar_audio_info info;
141  } stpl;
142 } inst;
143} g_listen[ROAR_MAX_LISTEN_SOCKETS];
144#endif
145
146int g_self_client;
147
148int g_terminate;
149
150struct roar_audio_info * g_sa, * g_max_sa;
151
152struct roard_config {
153 uint32_t flags;
154 struct {
155  uint32_t flags;
156  struct roar_mixer_settings mixer;
157  int                        mixer_channels;
158 } streams[ROAR_DIR_DIRIDS];
159 char * location;
160 size_t jumbo_mtu;
161} * g_config;
162
163#endif
164
165//ll
Note: See TracBrowser for help on using the repository browser.