gui: Add trailing newline to all log messages.
[paraslash.git] / afh_common.c
index 577053d45c743d01cc50494e5c9e84e74c42b6a2..cad972d94026eb1f1587fdf7201b752786b801b7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1997-2012 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 1997-2014 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -7,7 +7,6 @@
 /** \file afh_common.c Common audio format handler functions. */
 
 #include <sys/mman.h> /* mmap */
-#include <sys/time.h> /* gettimeofday */
 #include <sys/types.h>
 #include <regex.h>
 
@@ -32,6 +31,10 @@ void mp3_init(struct audio_format_handler *);
        void flac_afh_init(struct audio_format_handler *);
 #endif
 
+#ifdef HAVE_OPUS
+       void opus_afh_init(struct audio_format_handler *);
+#endif
+
 void wma_afh_init(struct audio_format_handler *);
 
 /** The list of all status items */
@@ -80,6 +83,12 @@ static struct audio_format_handler afl[] = {
                .name = "flac",
 #ifdef HAVE_FLAC
                .init = flac_afh_init,
+#endif
+       },
+       {
+               .name = "opus",
+#ifdef HAVE_OPUS
+               .init = opus_afh_init,
 #endif
        },
        {
@@ -109,8 +118,7 @@ void afh_init(void)
 {
        int i;
 
-       PARA_INFO_LOG("supported audio formats: %s\n",
-               SERVER_AUDIO_FORMATS);
+       PARA_INFO_LOG("supported audio formats: %s\n", AUDIO_FORMAT_HANDLERS);
        FOR_EACH_AUDIO_FORMAT(i) {
                PARA_NOTICE_LOG("initializing %s handler\n",
                        audio_format_name(i));