source: roaraudio/roard/include/roard.h @ 3130:f444c514901c

Last change on this file since 3130:f444c514901c was 3130:f444c514901c, checked in by phi, 14 years ago

cleanup

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 <libroarlight/libroarlight.h>
35#include <libroareio/libroareio.h>
36
37#include <ctype.h>
38
39#ifdef ROAR_HAVE_H_SIGNAL
40#include <signal.h>
41#endif
42
43#if defined(ROAR_HAVE_SELECT) && defined(ROAR_HAVE_H_SYS_SELECT)
44#include <sys/select.h>
45#endif
46
47#ifdef ROAR_HAVE_WAIT
48#include <sys/wait.h>
49#endif
50
51#if !defined(ROAR_TARGET_WIN32) && !defined(ROAR_TARGET_MICROCONTROLLER)
52#include <pwd.h>
53#endif
54
55#ifndef ROAR_TARGET_MICROCONTROLLER
56#include <sys/time.h>
57#include <time.h>
58#endif
59
60#ifdef ROAR_HAVE_LIBSLP
61#include <slp.h>
62#endif
63
64/*
65#ifdef __linux__
66#include <linux/unistd.h>
67#include <linux/ioprio.h>
68#endif
69*/
70
71#define ROAR_SUBSYS_NONE          0x00
72#define ROAR_SUBSYS_WAVEFORM      0x01
73#define ROAR_SUBSYS_MIDI          0x02
74#define ROAR_SUBSYS_CB            0x04
75#define ROAR_SUBSYS_LIGHT         0x08
76#define ROAR_SUBSYS_RAW           0x10
77#define ROAR_SUBSYS_COMPLEX       0x20
78#define ROAR_SUBSYS_RDTCS         0x40
79
80// some usefull macros:
81#define _8BIT  1
82#define _16BIT 2
83#define _24BIT 3
84#define _32BIT 4
85#define _64BIT 8
86
87// listeing code:
88#define ROAR_MAX_LISTEN_SOCKETS  8
89
90//#include "buffer.h"
91#include "codecfilter.h"
92#include "container_framework.h"
93#include "client.h"
94#include "driver.h"
95#include "output.h"
96#include "mixer.h"
97//#include "convert.h"
98#include "streams.h"
99#include "network.h"
100#include "commands.h"
101#include "req.h"
102#include "emul_esd.h"
103#include "sources.h"
104#include "sample.h"
105#include "meta.h"
106#include "midi.h"
107#include "ssynth.h"
108#include "light.h"
109#include "raw.h"
110#include "rdtcs.h"
111#include "waveform.h"
112#include "lib.h"
113
114
115int alive;
116#ifdef ROAR_SUPPORT_LISTEN
117int g_no_listen;
118#endif
119
120uint32_t g_pos; // current possition in output stream
121
122int g_standby;
123int g_autostandby;
124
125int main_loop (int driver, DRIVER_USERDATA_T driver_inst, struct roar_audio_info * sa, int sysclocksync);
126void cleanup_listen_socket (int terminate);
127void clean_quit (void);
128void clean_quit_prep (void);
129
130void on_sig_int (int signum);
131void on_sig_term (int signum);
132void on_sig_chld (int signum);
133void on_sig_usr1 (int signum);
134
135#ifdef ROAR_SUPPORT_LISTEN
136struct {
137 int socket;
138 int proto;
139 union {
140  void * vp;
141  int    si;
142  struct {
143   int                    dir;
144   struct roar_audio_info info;
145  } stpl;
146 } inst;
147} g_listen[ROAR_MAX_LISTEN_SOCKETS];
148#endif
149
150int g_self_client;
151
152int g_terminate;
153
154struct roar_audio_info * g_sa, * g_max_sa;
155
156struct roard_config {
157 uint32_t flags;
158 struct {
159  uint32_t flags;
160  struct roar_mixer_settings mixer;
161  int                        mixer_channels;
162 } streams[ROAR_DIR_DIRIDS];
163 char * location;
164 size_t jumbo_mtu;
165} * g_config;
166
167#endif
168
169//ll
Note: See TracBrowser for help on using the repository browser.