[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 | |
---|
[1482] | 28 | // need to include this first as we need the config |
---|
| 29 | #include <roaraudio.h> |
---|
[1964] | 30 | #include <libroarlight/libroarlight.h> |
---|
[2283] | 31 | #include <libroareio/libroareio.h> |
---|
[1482] | 32 | |
---|
| 33 | |
---|
| 34 | #ifndef ROAR_TARGET_MICROCONTROLLER |
---|
[0] | 35 | #include <signal.h> |
---|
[1482] | 36 | #endif |
---|
| 37 | |
---|
[1537] | 38 | #if defined(ROAR_HAVE_SELECT) && defined(ROAR_HAVE_H_SYS_SELECT) |
---|
[0] | 39 | #include <sys/select.h> |
---|
[1482] | 40 | #endif |
---|
| 41 | |
---|
| 42 | #ifdef ROAR_HAVE_WAIT |
---|
[248] | 43 | #include <sys/wait.h> |
---|
[1482] | 44 | #endif |
---|
| 45 | |
---|
| 46 | #if !defined(ROAR_TARGET_WIN32) && !defined(ROAR_TARGET_MICROCONTROLLER) |
---|
[444] | 47 | #include <pwd.h> |
---|
[1482] | 48 | #endif |
---|
| 49 | |
---|
| 50 | #ifndef ROAR_TARGET_MICROCONTROLLER |
---|
[1198] | 51 | #include <sys/time.h> |
---|
| 52 | #include <time.h> |
---|
[1482] | 53 | #endif |
---|
[242] | 54 | |
---|
[1993] | 55 | #ifdef ROAR_HAVE_LIBSLP |
---|
| 56 | #include <slp.h> |
---|
| 57 | #endif |
---|
| 58 | |
---|
[243] | 59 | /* |
---|
[242] | 60 | #ifdef __linux__ |
---|
[243] | 61 | #include <linux/unistd.h> |
---|
[242] | 62 | #include <linux/ioprio.h> |
---|
| 63 | #endif |
---|
[243] | 64 | */ |
---|
[242] | 65 | |
---|
[1917] | 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 |
---|
[2232] | 71 | #define ROAR_SUBSYS_RAW 0x10 |
---|
[1917] | 72 | |
---|
[2307] | 73 | // some usefull macros: |
---|
| 74 | #define _8BIT 1 |
---|
| 75 | #define _16BIT 2 |
---|
| 76 | #define _24BIT 3 |
---|
| 77 | #define _32BIT 4 |
---|
| 78 | #define _64BIT 8 |
---|
[242] | 79 | |
---|
[0] | 80 | //#include "buffer.h" |
---|
[247] | 81 | #include "codecfilter.h" |
---|
[0] | 82 | #include "client.h" |
---|
| 83 | #include "driver.h" |
---|
| 84 | #include "output.h" |
---|
| 85 | #include "mixer.h" |
---|
| 86 | //#include "convert.h" |
---|
| 87 | #include "streams.h" |
---|
| 88 | #include "network.h" |
---|
| 89 | #include "commands.h" |
---|
| 90 | #include "req.h" |
---|
[2519] | 91 | #include "emul_esd.h" |
---|
[0] | 92 | #include "sources.h" |
---|
[40] | 93 | #include "sample.h" |
---|
[89] | 94 | #include "meta.h" |
---|
[244] | 95 | #include "midi.h" |
---|
[2446] | 96 | #include "ssynth.h" |
---|
[1816] | 97 | #include "light.h" |
---|
[2236] | 98 | #include "raw.h" |
---|
[245] | 99 | #include "lib.h" |
---|
[0] | 100 | |
---|
[242] | 101 | |
---|
[0] | 102 | int alive; |
---|
[1494] | 103 | #ifdef ROAR_SUPPORT_LISTEN |
---|
[1155] | 104 | int g_no_listen; |
---|
[1494] | 105 | #endif |
---|
[0] | 106 | |
---|
[246] | 107 | uint32_t g_pos; // current possition in output stream |
---|
| 108 | |
---|
[0] | 109 | int g_standby; |
---|
[920] | 110 | int g_autostandby; |
---|
[0] | 111 | |
---|
[905] | 112 | int main_loop (int driver, DRIVER_USERDATA_T driver_inst, struct roar_audio_info * sa, int sysclocksync); |
---|
[574] | 113 | void cleanup_listen_socket (int terminate); |
---|
[0] | 114 | void clean_quit (void); |
---|
| 115 | void clean_quit_prep (void); |
---|
| 116 | |
---|
| 117 | void on_sig_int (int signum); |
---|
[248] | 118 | void on_sig_chld (int signum); |
---|
[2112] | 119 | void on_sig_usr1 (int signum); |
---|
[0] | 120 | |
---|
[1494] | 121 | #ifdef ROAR_SUPPORT_LISTEN |
---|
[0] | 122 | int g_listen_socket; |
---|
[1494] | 123 | #endif |
---|
[0] | 124 | |
---|
[37] | 125 | int g_self_client; |
---|
| 126 | |
---|
[71] | 127 | int g_terminate; |
---|
| 128 | |
---|
[1609] | 129 | struct roar_audio_info * g_sa, * g_max_sa; |
---|
| 130 | |
---|
| 131 | struct roard_config { |
---|
| 132 | uint32_t flags; |
---|
| 133 | struct { |
---|
| 134 | uint32_t flags; |
---|
| 135 | struct roar_mixer_settings mixer; |
---|
| 136 | int mixer_channels; |
---|
| 137 | } streams[ROAR_DIR_DIRIDS]; |
---|
[2017] | 138 | char * location; |
---|
[1609] | 139 | } * g_config; |
---|
[0] | 140 | |
---|
| 141 | #endif |
---|
| 142 | |
---|
| 143 | //ll |
---|