//roard.h: /* * Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2008, 2009 * * This file is part of roard a part of RoarAudio, * a cross-platform sound system for both, home and professional use. * See README for details. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 * as published by the Free Software Foundation. * * RoarAudio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this software; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * */ #ifndef _ROARD_H_ #define _ROARD_H_ // configure ROAR_INFO() int g_verbose; #define ROAR_DBG_INFOVAR g_verbose // need to include this first as we need the config #include #include #include #include #ifdef ROAR_HAVE_H_SIGNAL #include #endif #if defined(ROAR_HAVE_SELECT) && defined(ROAR_HAVE_H_SYS_SELECT) #include #endif #ifdef ROAR_HAVE_WAIT #include #endif #if !defined(ROAR_TARGET_WIN32) && !defined(ROAR_TARGET_MICROCONTROLLER) #include #endif #ifdef ROAR_HAVE_H_SYS_TIME #include #endif #ifdef ROAR_HAVE_H_TIME #include #endif #ifdef ROAR_HAVE_LIBSLP #include #endif /* #ifdef __linux__ #include #include #endif */ #define ROAR_SUBSYS_NONE 0x00 #define ROAR_SUBSYS_WAVEFORM 0x01 #define ROAR_SUBSYS_MIDI 0x02 #define ROAR_SUBSYS_CB 0x04 #define ROAR_SUBSYS_LIGHT 0x08 #define ROAR_SUBSYS_RAW 0x10 #define ROAR_SUBSYS_COMPLEX 0x20 #define ROAR_SUBSYS_RDTCS 0x40 // some usefull macros: #define _8BIT 1 #define _16BIT 2 #define _24BIT 3 #define _32BIT 4 #define _64BIT 8 // listeing code: #define ROAR_MAX_LISTEN_SOCKETS 8 //#include "buffer.h" #include "codecfilter.h" #include "container_framework.h" #include "client.h" #include "driver.h" #include "output.h" #include "mixer.h" //#include "convert.h" #include "streams.h" #include "network.h" #include "commands.h" #include "req.h" #include "emul_esd.h" #include "sources.h" #include "sample.h" #include "meta.h" #include "midi.h" #include "ssynth.h" #include "light.h" #include "raw.h" #include "rdtcs.h" #include "waveform.h" #include "lib.h" int alive; #ifdef ROAR_SUPPORT_LISTEN int g_no_listen; #endif uint32_t g_pos; // current possition in output stream int g_standby; int g_autostandby; int main_loop (int driver, DRIVER_USERDATA_T driver_inst, struct roar_audio_info * sa, int sysclocksync); void cleanup_listen_socket (int terminate); void clean_quit (void); void clean_quit_prep (void); void on_sig_int (int signum); void on_sig_term (int signum); void on_sig_chld (int signum); void on_sig_usr1 (int signum); #ifdef ROAR_SUPPORT_LISTEN struct { int socket; int proto; union { void * vp; int si; struct { int dir; struct roar_audio_info info; } stpl; } inst; } g_listen[ROAR_MAX_LISTEN_SOCKETS]; #endif int g_self_client; int g_terminate; struct roar_audio_info * g_sa, * g_max_sa; struct roard_config { uint32_t flags; struct { uint32_t flags; struct roar_mixer_settings mixer; int mixer_channels; } streams[ROAR_DIR_DIRIDS]; char * location; size_t jumbo_mtu; } * g_config; #endif //ll