]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - mp3_afh.c
Fix a bug in the mood line parser.
[paraslash.git] / mp3_afh.c
index 8d4a5416308b140b34bfc68ce707b477ce92d01d..df7b85ee790905e2446f05feac534040e83fdf45 100644 (file)
--- a/mp3_afh.c
+++ b/mp3_afh.c
@@ -1,19 +1,7 @@
 /*
  * Copyright (C) 2003-2007 Andre Noll <maan@systemlinux.org>
  *
- *     This program is free software; you can redistribute it and/or modify
- *     it under the terms of the GNU General Public License as published by
- *     the Free Software Foundation; either version 2 of the License, or
- *     (at your option) any later version.
- *
- *     This program 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 program; if not, write to the Free Software
- *     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Licensed under the GPL v2. For licencing details see COPYING.
  */
 
 /** \file mp3_afh.c para_server's mp3 audio format handler */
  *                      Johannes Overmann <overmann@iname.com>
  */
 
-#include "server.h"
+#include "para.h"
 #include "error.h"
+#include "afh.h"
 #include "string.h"
+#include "afs.h"
+#include "server.h"
 
 /** \cond some defines and structs which are only used in this file */
 
@@ -143,7 +134,7 @@ static int frame_length(struct mp3header *header)
                + header->padding;
 }
 
-static void write_info_str(struct audio_format_info *afi)
+static void write_info_str(struct afh_info *afi)
 {
        int v = mp3.id3_isvalid;
 
@@ -281,7 +272,7 @@ static void mp3_get_id3(unsigned char *map, size_t numbytes, off_t *fpos)
                return;
        *fpos = numbytes - 128;
        if (strncmp("TAG", (char *) map + *fpos, 3)) {
-               PARA_INFO_LOG("%s", "no id3 tag\n");
+               PARA_DEBUG_LOG("%s", "no id3 tag\n");
                return;
        }
        *fpos = numbytes - 125;
@@ -326,7 +317,7 @@ static int find_valid_start(unsigned char *map, size_t numbytes, off_t *fpos)
 }
 
 static int mp3_read_info(unsigned char *map, size_t numbytes,
-               struct audio_format_info *afi)
+               struct afh_info *afi)
 {
        long fl_avg = 0, freq_avg = 0, br_avg = 0;
        int ret, len = 0, old_br = -1;
@@ -411,8 +402,8 @@ err_out:
 /*
  * Read mp3 information from audio file
  */
-static int mp3_get_file_info(char *map, size_t numbytes,
-               struct audio_format_info *afi)
+int mp3_get_file_info(char *map, size_t numbytes,
+               struct afh_info *afi)
 {
        int ret;