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
RevLine 
[0]1//roard.h:
2
[668]3/*
[2446]4 *      Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2008, 2009
[668]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
[0]25#ifndef _ROARD_H_
26#define _ROARD_H_
27
[2970]28// configure ROAR_INFO()
29int g_verbose;
30#define ROAR_DBG_INFOVAR g_verbose
31
[1482]32// need to include this first as we need the config
33#include <roaraudio.h>
[1964]34#include <libroarlight/libroarlight.h>
[2283]35#include <libroareio/libroareio.h>
[1482]36
[2726]37#include <ctype.h>
[1482]38
[3056]39#ifdef ROAR_HAVE_H_SIGNAL
[0]40#include <signal.h>
[1482]41#endif
42
[1537]43#if defined(ROAR_HAVE_SELECT) && defined(ROAR_HAVE_H_SYS_SELECT)
[0]44#include <sys/select.h>
[1482]45#endif
46
47#ifdef ROAR_HAVE_WAIT
[248]48#include <sys/wait.h>
[1482]49#endif
50
51#if !defined(ROAR_TARGET_WIN32) && !defined(ROAR_TARGET_MICROCONTROLLER)
[444]52#include <pwd.h>
[1482]53#endif
54
[3202]55#ifdef ROAR_HAVE_H_SYS_TIME
[1198]56#include <sys/time.h>
[3202]57#endif
58#ifdef ROAR_HAVE_H_TIME
[1198]59#include <time.h>
[1482]60#endif
[242]61
[1993]62#ifdef ROAR_HAVE_LIBSLP
63#include <slp.h>
64#endif
65
[243]66/*
[242]67#ifdef __linux__
[243]68#include <linux/unistd.h>
[242]69#include <linux/ioprio.h>
70#endif
[243]71*/
[242]72
[1917]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
[2232]78#define ROAR_SUBSYS_RAW           0x10
[2681]79#define ROAR_SUBSYS_COMPLEX       0x20
[2838]80#define ROAR_SUBSYS_RDTCS         0x40
[1917]81
[2307]82// some usefull macros:
83#define _8BIT  1
84#define _16BIT 2
85#define _24BIT 3
86#define _32BIT 4
87#define _64BIT 8
[242]88
[2530]89// listeing code:
90#define ROAR_MAX_LISTEN_SOCKETS  8
91
[0]92//#include "buffer.h"
[2674]93#include "codecfilter.h"
[2657]94#include "container_framework.h"
[0]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"
[2519]104#include "emul_esd.h"
[0]105#include "sources.h"
[40]106#include "sample.h"
[89]107#include "meta.h"
[244]108#include "midi.h"
[2446]109#include "ssynth.h"
[1816]110#include "light.h"
[2236]111#include "raw.h"
[2717]112#include "rdtcs.h"
[2945]113#include "waveform.h"
[245]114#include "lib.h"
[0]115
[242]116
[0]117int alive;
[1494]118#ifdef ROAR_SUPPORT_LISTEN
[1155]119int g_no_listen;
[1494]120#endif
[0]121
[246]122uint32_t g_pos; // current possition in output stream
123
[0]124int g_standby;
[920]125int g_autostandby;
[0]126
[905]127int main_loop (int driver, DRIVER_USERDATA_T driver_inst, struct roar_audio_info * sa, int sysclocksync);
[574]128void cleanup_listen_socket (int terminate);
[0]129void clean_quit (void);
130void clean_quit_prep (void);
131
132void on_sig_int (int signum);
[2732]133void on_sig_term (int signum);
[248]134void on_sig_chld (int signum);
[2112]135void on_sig_usr1 (int signum);
[0]136
[1494]137#ifdef ROAR_SUPPORT_LISTEN
[3128]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];
[1494]150#endif
[0]151
[37]152int g_self_client;
153
[71]154int g_terminate;
155
[1609]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];
[2017]165 char * location;
[3039]166 size_t jumbo_mtu;
[1609]167} * g_config;
[0]168
169#endif
170
171//ll
Note: See TracBrowser for help on using the repository browser.