]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - afh.h
Move common audio format handler functions to new afh_common.c.
[paraslash.git] / afh.h
diff --git a/afh.h b/afh.h
index c1a7029371cbf991129de0a2d6063f4183faeddf..9ad078582e156be166b7c06dc35100549a26f337 100644 (file)
--- a/afh.h
+++ b/afh.h
@@ -9,23 +9,17 @@
 /** \cond */
 #ifdef HAVE_OGGVORBIS
 #define OV_AUDIO_FORMAT " ogg"
-#define OV_AUDIO_FORMAT_ARRAY , "ogg"
 #else
 #define OV_AUDIO_FORMAT ""
-#define OV_AUDIO_FORMAT_ARRAY
 #endif
 
 #ifdef HAVE_FAAD
 #define AAC_AUDIO_FORMAT " aac"
-#define AAC_AUDIO_FORMAT_ARRAY , "aac"
 #else
 #define AAC_AUDIO_FORMAT ""
-#define AAC_AUDIO_FORMAT_ARRAY
 #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 */
 
@@ -47,7 +41,7 @@ struct audio_format_info {
         * 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. */
@@ -107,3 +101,8 @@ struct audio_format_handler {
                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);