[0] | 1 | //roard.h: |
---|
| 2 | |
---|
[668] | 3 | /* |
---|
| 4 | * Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2008 |
---|
| 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> |
---|
| 30 | |
---|
| 31 | |
---|
| 32 | #ifndef ROAR_TARGET_MICROCONTROLLER |
---|
[0] | 33 | #include <signal.h> |
---|
[1482] | 34 | #endif |
---|
| 35 | |
---|
[1537] | 36 | #if defined(ROAR_HAVE_SELECT) && defined(ROAR_HAVE_H_SYS_SELECT) |
---|
[0] | 37 | #include <sys/select.h> |
---|
[1482] | 38 | #endif |
---|
| 39 | |
---|
| 40 | #ifdef ROAR_HAVE_WAIT |
---|
[248] | 41 | #include <sys/wait.h> |
---|
[1482] | 42 | #endif |
---|
| 43 | |
---|
| 44 | #if !defined(ROAR_TARGET_WIN32) && !defined(ROAR_TARGET_MICROCONTROLLER) |
---|
[444] | 45 | #include <pwd.h> |
---|
[1482] | 46 | #endif |
---|
| 47 | |
---|
| 48 | #ifndef ROAR_TARGET_MICROCONTROLLER |
---|
[1198] | 49 | #include <sys/time.h> |
---|
| 50 | #include <time.h> |
---|
[1482] | 51 | #endif |
---|
[242] | 52 | |
---|
[243] | 53 | /* |
---|
[242] | 54 | #ifdef __linux__ |
---|
[243] | 55 | #include <linux/unistd.h> |
---|
[242] | 56 | #include <linux/ioprio.h> |
---|
| 57 | #endif |
---|
[243] | 58 | */ |
---|
[242] | 59 | |
---|
| 60 | |
---|
[0] | 61 | //#include "buffer.h" |
---|
[247] | 62 | #include "codecfilter.h" |
---|
[0] | 63 | #include "client.h" |
---|
| 64 | #include "driver.h" |
---|
| 65 | #include "output.h" |
---|
| 66 | #include "mixer.h" |
---|
| 67 | //#include "convert.h" |
---|
| 68 | #include "streams.h" |
---|
| 69 | #include "network.h" |
---|
| 70 | #include "commands.h" |
---|
| 71 | #include "req.h" |
---|
| 72 | #include "sources.h" |
---|
[40] | 73 | #include "sample.h" |
---|
[89] | 74 | #include "meta.h" |
---|
[244] | 75 | #include "midi.h" |
---|
[245] | 76 | #include "lib.h" |
---|
[0] | 77 | |
---|
[242] | 78 | |
---|
[0] | 79 | int alive; |
---|
[1494] | 80 | #ifdef ROAR_SUPPORT_LISTEN |
---|
[1155] | 81 | int g_no_listen; |
---|
[1494] | 82 | #endif |
---|
[0] | 83 | |
---|
[246] | 84 | uint32_t g_pos; // current possition in output stream |
---|
| 85 | |
---|
[0] | 86 | int g_standby; |
---|
[920] | 87 | int g_autostandby; |
---|
[0] | 88 | |
---|
[905] | 89 | int main_loop (int driver, DRIVER_USERDATA_T driver_inst, struct roar_audio_info * sa, int sysclocksync); |
---|
[574] | 90 | void cleanup_listen_socket (int terminate); |
---|
[0] | 91 | void clean_quit (void); |
---|
| 92 | void clean_quit_prep (void); |
---|
| 93 | |
---|
| 94 | void on_sig_int (int signum); |
---|
[248] | 95 | void on_sig_chld (int signum); |
---|
[0] | 96 | |
---|
[1494] | 97 | #ifdef ROAR_SUPPORT_LISTEN |
---|
[0] | 98 | int g_listen_socket; |
---|
[1494] | 99 | #endif |
---|
[0] | 100 | |
---|
[37] | 101 | int g_self_client; |
---|
| 102 | |
---|
[71] | 103 | int g_terminate; |
---|
| 104 | |
---|
[1609] | 105 | struct roar_audio_info * g_sa, * g_max_sa; |
---|
| 106 | |
---|
| 107 | struct roard_config { |
---|
| 108 | uint32_t flags; |
---|
| 109 | struct { |
---|
| 110 | uint32_t flags; |
---|
| 111 | struct roar_mixer_settings mixer; |
---|
| 112 | int mixer_channels; |
---|
| 113 | } streams[ROAR_DIR_DIRIDS]; |
---|
| 114 | } * g_config; |
---|
[0] | 115 | |
---|
| 116 | #endif |
---|
| 117 | |
---|
| 118 | //ll |
---|