source: roaraudio/roard/include/roard.h @ 3255:970b81dc7c18

Last change on this file since 3255:970b81dc7c18 was 3255:970b81dc7c18, checked in by phi, 14 years ago

got PA simple protocol basicly to work

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 "emul_simple.h"
100#include "sources.h"
101#include "sample.h"
102#include "meta.h"
103#include "midi.h"
104#include "ssynth.h"
105#include "light.h"
106#include "raw.h"
107#include "rdtcs.h"
108#include "waveform.h"
109#include "lib.h"
110
111
112int alive;
113#ifdef ROAR_SUPPORT_LISTEN
114int g_no_listen;
115#endif
116
117uint32_t g_pos; // current possition in output stream
118
119int g_standby;
120int g_autostandby;
121
122int main_loop (int driver, DRIVER_USERDATA_T driver_inst, struct roar_audio_info * sa, int sysclocksync);
123void cleanup_listen_socket (int terminate);
124void clean_quit (void);
125void clean_quit_prep (void);
126
127void on_sig_int (int signum);
128void on_sig_term (int signum);
129void on_sig_chld (int signum);
130void on_sig_usr1 (int signum);
131
132#ifdef ROAR_SUPPORT_LISTEN
133struct roard_listen {
134 int socket;
135 int proto;
136 union {
137  void * vp;
138  int    si;
139  struct {
140   int                    dir;
141   struct roar_audio_info info;
142  } stpl;
143 } inst;
144} g_listen[ROAR_MAX_LISTEN_SOCKETS];
145#endif
146
147int g_self_client;
148
149int g_terminate;
150
151struct roar_audio_info * g_sa, * g_max_sa;
152
153struct roard_config {
154 uint32_t flags;
155 struct {
156  uint32_t flags;
157  struct roar_mixer_settings mixer;
158  int                        mixer_channels;
159 } streams[ROAR_DIR_DIRIDS];
160 char * location;
161 size_t jumbo_mtu;
162} * g_config;
163
164#endif
165
166//ll
Note: See TracBrowser for help on using the repository browser.