Fix a bug in the mood line parser.
[paraslash.git] / afh.h
diff --git a/afh.h b/afh.h
index b4de774ad4f74de087d3d65cb78cf8a890ebef9f..52d50a9103c8093a840c9b8e09003ad764f69c1f 100644 (file)
--- a/afh.h
+++ b/afh.h
@@ -30,7 +30,7 @@
  * Audio format dependent information. Details vary between each audio format
  * handler.
  */
-struct audio_format_info {
+struct afh_info {
        /** The number of chunks this audio file contains. */
        long unsigned chunks_total;
        /** The length of the audio file in seconds. */
@@ -41,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. */
@@ -93,11 +93,16 @@ struct audio_format_handler {
         * valid for this audio format. A negative return value indicates that
         * this audio format handler is unable to decode the given file. On
         * success, the function must return a positive value and fill in the
-        * given struct audio_format_info.
+        * given struct afh_info.
         *
-        * \sa struct audio_format_info
+        * \sa struct afh_info
         */
        int (*get_file_info)(char *map, size_t numbytes,
-               struct audio_format_info *afi);
+               struct afh_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 afh_info *afhi);
+const char *audio_format_name(int);