X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=afh.h;h=52d50a9103c8093a840c9b8e09003ad764f69c1f;hp=b4de774ad4f74de087d3d65cb78cf8a890ebef9f;hb=d4776878609698ca63c99c3db711ae3edf038bba;hpb=880818ccab1a9223399194926dfa33b509d8bc12 diff --git a/afh.h b/afh.h index b4de774a..52d50a91 100644 --- 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);