source: roaraudio/roard/include/roard.h @ 2681:359a85bcf5e9

Last change on this file since 2681:359a85bcf5e9 was 2681:359a85bcf5e9, checked in by phi, 15 years ago

added new subsystem complex

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