Merge branch 'master' into my-osx
authormaan <maan@Gumbo.local>
Sun, 11 Jun 2006 20:57:48 +0000 (22:57 +0200)
committermaan <maan@Gumbo.local>
Sun, 11 Jun 2006 20:57:48 +0000 (22:57 +0200)
Fix Conflicts:

error.h

1  2 
configure.ac
error.h

diff --combined configure.ac
@@@ -64,6 -64,9 +64,9 @@@ filter_cmdline_objs="filter.cmdline com
  filter_errlist_objs="filter_chain wav compress filter string stdin stdout sched fd"
  filter_ldflags=""
  
+ audioc_cmdline_objs="audioc.cmdline"
+ audioc_errlist_objs="audioc string net fd"
  audiod_cmdline_objs="audiod.cmdline grab_client.cmdline compress_filter.cmdline
        http_recv.cmdline dccp_recv.cmdline file_write.cmdline"
  audiod_errlist_objs="audiod exec close_on_fork signal string daemon stat net
@@@ -149,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 <CoreAudio/CoreAudio.h>
 +],[
 +      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"
@@@ -383,6 -361,7 +386,7 @@@ audiod_objs="$audiod_cmdline_objs $audi
  server_objs="$server_cmdline_objs $server_errlist_objs"
  write_objs="$write_cmdline_objs $write_errlist_objs"
  client_objs="$client_cmdline_objs $client_errlist_objs"
+ audioc_objs="$audioc_cmdline_objs $audioc_errlist_objs"
  
  AC_SUBST(recv_objs, add_dot_o($recv_objs))
  AC_SUBST(recv_ldflags, $recv_ldflags)
@@@ -414,6 -393,10 +418,10 @@@ AC_SUBST(client_ldflags, $client_ldflag
  AC_DEFINE_UNQUOTED(INIT_CLIENT_ERRLISTS,
        objlist_to_errlist($client_errlist_objs), errors used by para_client)
  
+ AC_SUBST(audioc_objs, add_dot_o($audioc_objs))
+ AC_DEFINE_UNQUOTED(INIT_AUDIOC_ERRLISTS,
+       objlist_to_errlist($audioc_errlist_objs), errors used by para_audioc)
  enum="$(for i in $write_writers; do printf "${i}_WRITE, " | tr '[a-z]' '[A-Z]'; done)"
  AC_DEFINE_UNQUOTED(WRITER_ENUM, $enum NUM_SUPPORTED_WRITERS,
        enum of supported writers)
diff --combined error.h
+++ b/error.h
@@@ -20,8 -20,6 +20,6 @@@
  
  /** \cond list of all subsystems that support the shiny error facility */
  enum para_subsystem {
-       SS_CLIENT,
-       SS_SCHED,
        SS_GUI,
        SS_TIME,
        SS_WAV,
@@@ -33,6 -31,9 +31,9 @@@
        SS_RECV,
        SS_NET,
        SS_ORTP_RECV,
+       SS_CLIENT,
+       SS_AUDIOC,
+       SS_SCHED,
        SS_AUDIOD,
        SS_AUDIOD_COMMAND,
        SS_EXEC,
@@@ -71,7 -72,6 +72,7 @@@
        SS_WRITE_COMMON,
        SS_ALSA_WRITER,
        SS_FILE_WRITER,
 +      SS_OSX_WRITER,
        NUM_SS
  };
  
  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"), \
+       PARA_ERROR(AUDIOC_WRITE, "audioc write error"), \
+       PARA_ERROR(INIT_SOCK_ADDR, "can not init socket"), \
+       PARA_ERROR(AUDIOC_CONNECT, "audioc connect error"), \
+       PARA_ERROR(AUDIOC_OVERRUN, "audioc buffer overrun"), \
  #define CLIENT_ERRORS \
        PARA_ERROR(CLIENT_SYNTAX, "syntax error"), \
        PARA_ERROR(INVALID_CHALLENGE, "did not receive valid challenge"), \
@@@ -546,9 -546,9 +556,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(AUDIOC);
  /** \endcond */
  #undef PARA_ERROR
  /* rest of the world only sees the error text */