source: roaraudio/roard/include/roard.h @ 3202:d72eef44e059

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

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