From: maan Date: Thu, 15 Jun 2006 08:17:41 +0000 (+0200) Subject: Merge branch 'master' into my-osx X-Git-Tag: v0.2.14~62 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=27638103f249ffbe9768603b9baff199950fd9f6;hp=-c Merge branch 'master' into my-osx --- 27638103f249ffbe9768603b9baff199950fd9f6 diff --combined configure.ac index 4dcf0f2b,49b3198a..81d1cbba --- a/configure.ac +++ b/configure.ac @@@ -86,7 -86,7 +86,7 @@@ write_ldflags=" write_writers="file" client_cmdline_objs="client.cmdline" - client_errlist_objs="client net string crypt" + client_errlist_objs="client net string crypt fd sched stdin stdout client_common" client_ldflags="" ########################################################################### ssl @@@ -152,31 -152,6 +152,31 @@@ if test ${have_ucred} = yes; the AC_DEFINE(HAVE_UCRED, 1, define to 1 you have struct ucred) fi +########################################################################### osx + +AC_MSG_CHECKING(for CoreAudio (MacOs)) +AC_TRY_LINK([ + #include +],[ + AudioDeviceID id; +],[have_core_audio=yes],[have_core_audio=no]) +AC_MSG_RESULT($have_core_audio) +if test ${have_core_audio} = yes; then + f1="-framework CoreAudio" + f2="-framework AudioToolbox" + f3="-framework AudioUnit" + f4="-framework CoreServices" + f="$f1 $f2 $f3 $f4" + audiod_errlist_objs="$audiod_errlist_objs osx_writer" + audiod_cmdline_objs="$audiod_cmdline_objs osx_write.cmdline" + audiod_ldflags="$audiod_ldflags $f" + + write_errlist_objs="$write_errlist_objs osx_writer" + write_cmdline_objs="$write_cmdline_objs osx_write.cmdline" + write_ldflags="$write_ldflags $f" + write_writers="$write_writers osx" + AC_DEFINE(HAVE_CORE_AUDIO, 1, define to 1 on MacOs) +fi ########################################################################### gtk2 pkg_modules="gtk+-2.0 >= 2.0.0" diff --combined error.h index a64348e3,78e3242c..89dbb0f6 --- a/error.h +++ b/error.h @@@ -20,6 -20,7 +20,7 @@@ /** \cond list of all subsystems that support the shiny error facility */ enum para_subsystem { + SS_CLIENT, SS_GUI, SS_TIME, SS_WAV, @@@ -31,7 -32,7 +32,7 @@@ SS_RECV, SS_NET, SS_ORTP_RECV, - SS_CLIENT, + SS_CLIENT_COMMON, SS_AUDIOC, SS_SCHED, SS_AUDIOD, @@@ -72,12 -73,12 +73,13 @@@ SS_WRITE_COMMON, SS_ALSA_WRITER, SS_FILE_WRITER, + SS_OSX_WRITER, NUM_SS }; /* these do not need error handling (yet) */ #define SERVER_ERRORS + #define CLIENT_ERRORS #define WAV_ERRORS #define COMPRESS_ERRORS #define TIME_ERRORS @@@ -92,15 -93,6 +94,15 @@@ extern const char **para_errlist[]; /** \endcond */ +#define OSX_WRITER_ERRORS \ + PARA_ERROR(STREAM_FORMAT, "could not set stream format"), \ + PARA_ERROR(ADD_CALLBACK, "can not add callback"), \ + PARA_ERROR(READ_STDIN, "failed to read from stdin"), \ + PARA_ERROR(OPEN_COMP, "OpenAComponent() error"), \ + PARA_ERROR(UNIT_INIT, "AudioUnitInitialize() error"), \ + PARA_ERROR(DEFAULT_COMP, "can not find default audio output component"), \ + + #define AUDIOC_ERRORS \ PARA_ERROR(AUDIOC_SYNTAX, "audioc syntax error"), \ PARA_ERROR(AUDIOC_READ, "audioc read error"), \ @@@ -110,16 -102,22 +112,22 @@@ PARA_ERROR(AUDIOC_OVERRUN, "audioc buffer overrun"), \ - #define CLIENT_ERRORS \ + + + #define CLIENT_COMMON_ERRORS \ PARA_ERROR(CLIENT_SYNTAX, "syntax error"), \ PARA_ERROR(INVALID_CHALLENGE, "did not receive valid challenge"), \ - PARA_ERROR(CLIENT_AUTH, "authentication failed"), \ - PARA_ERROR(SHORT_CLIENT_WRITE, "short client write"), \ PARA_ERROR(NO_CONFIG, "config file not found"), \ + PARA_ERROR(CLIENT_AUTH, "authentication failed"), \ + PARA_ERROR(SERVER_EOF, "connection closed by para_server"), \ + PARA_ERROR(INPUT_EOF, "end of input"), \ + PARA_ERROR(HANDSHAKE_COMPLETE, ""), /* not really an error */ \ + #define SCHED_ERRORS \ PARA_ERROR(TASK_KILLED, "task killed"), \ PARA_ERROR(NO_SUCH_TASK, "task not found"), \ + PARA_ERROR(NOT_INITIALIZED, "scheduler not yet initialized"), \ #define STDIN_ERRORS \ @@@ -556,9 -554,9 +564,10 @@@ SS_ENUM(WRITE) SS_ENUM(WRITE_COMMON); SS_ENUM(ALSA_WRITER); SS_ENUM(FILE_WRITER); +SS_ENUM(OSX_WRITER); SS_ENUM(RINGBUFFER); SS_ENUM(CLIENT); + SS_ENUM(CLIENT_COMMON); SS_ENUM(AUDIOC); /** \endcond */ #undef PARA_ERROR