]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - afh.h
Replace status item DBINFO3 by DIRECTORY.
[paraslash.git] / afh.h
diff --git a/afh.h b/afh.h
index 8c0c15cfb007e25a6639220b848fc8934ca1ec79..9ad078582e156be166b7c06dc35100549a26f337 100644 (file)
--- a/afh.h
+++ b/afh.h
@@ -9,28 +9,22 @@
 /** \cond */
 #ifdef HAVE_OGGVORBIS
 #define OV_AUDIO_FORMAT " ogg"
 /** \cond */
 #ifdef HAVE_OGGVORBIS
 #define OV_AUDIO_FORMAT " ogg"
-#define OV_AUDIO_FORMAT_ARRAY , "ogg"
 #else
 #define OV_AUDIO_FORMAT ""
 #else
 #define OV_AUDIO_FORMAT ""
-#define OV_AUDIO_FORMAT_ARRAY
 #endif
 
 #ifdef HAVE_FAAD
 #define AAC_AUDIO_FORMAT " aac"
 #endif
 
 #ifdef HAVE_FAAD
 #define AAC_AUDIO_FORMAT " aac"
-#define AAC_AUDIO_FORMAT_ARRAY , "aac"
 #else
 #define AAC_AUDIO_FORMAT ""
 #else
 #define AAC_AUDIO_FORMAT ""
-#define AAC_AUDIO_FORMAT_ARRAY
 #endif
 
 #define SUPPORTED_AUDIO_FORMATS "mp3" OV_AUDIO_FORMAT AAC_AUDIO_FORMAT
 #endif
 
 #define SUPPORTED_AUDIO_FORMATS "mp3" OV_AUDIO_FORMAT AAC_AUDIO_FORMAT
-#define SUPPORTED_AUDIO_FORMATS_ARRAY "mp3" OV_AUDIO_FORMAT_ARRAY \
-       AAC_AUDIO_FORMAT_ARRAY, NULL
 
 /** \endcond */
 
 /** size of the  audio_file info string */
 
 /** \endcond */
 
 /** size of the  audio_file info string */
-#define AUDIO_FILE_INFO_SIZE 16384
+#define AUDIO_FILE_INFO_SIZE 256
 
 /**
  * Audio format dependent information. Details vary between each audio format
 
 /**
  * Audio format dependent information. Details vary between each audio format
@@ -47,7 +41,7 @@ struct audio_format_info {
         * The table that specifies the offset of the individual pieces in
         * the current audio file.
         */
         * The table that specifies the offset of the individual pieces in
         * the current audio file.
         */
-       size_t *chunk_table;
+       uint32_t *chunk_table;
        /** Period of time between sending data chunks. */
        struct timeval chunk_tv;
        /** End of file timeout - Do not load new audio file until this time. */
        /** Period of time between sending data chunks. */
        struct timeval chunk_tv;
        /** End of file timeout - Do not load new audio file until this time. */
@@ -107,3 +101,8 @@ struct audio_format_handler {
                struct audio_format_info *afi);
 };
 
                struct audio_format_info *afi);
 };
 
+void afh_init(void);
+int guess_audio_format(const char *name);
+int compute_afhi(const char *path, char *data, size_t size,
+       struct audio_format_info *afhi);
+const char *audio_format_name(int);